Merge lp:~jelmer/brz/lgtm into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/lgtm
Merge into: lp:brz
Diff against target: 105 lines (+8/-15)
6 files modified
breezy/bundle/serializer/v08.py (+1/-4)
breezy/bzr/_knit_load_data_py.py (+0/-1)
breezy/bzr/knit.py (+0/-3)
breezy/git/dir.py (+2/-2)
breezy/plugins/fastimport/helpers.py (+2/-2)
breezy/plugins/propose/launchpad.py (+3/-3)
To merge this branch: bzr merge lp:~jelmer/brz/lgtm
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+365991@code.launchpad.net

Commit message

Fix some issues reported by lgtm.com.

Description of the change

Fix some issues reported by lgtm.com.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Thanks!

review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/bundle/serializer/v08.py'
--- breezy/bundle/serializer/v08.py 2018-11-29 23:42:41 +0000
+++ breezy/bundle/serializer/v08.py 2019-04-13 22:15:31 +0000
@@ -78,10 +78,7 @@
78 if len(prop) == 1:78 if len(prop) == 1:
79 p_texts.append(prop[0])79 p_texts.append(prop[0])
80 else:80 else:
81 try:81 p_texts.append('%s:%s' % prop)
82 p_texts.append('%s:%s' % prop)
83 except:
84 raise repr(prop)
85 text = ['=== ']82 text = ['=== ']
86 text.append(' // '.join(p_texts))83 text.append(' // '.join(p_texts))
87 text_line = ''.join(text).encode('utf-8')84 text_line = ''.join(text).encode('utf-8')
8885
=== modified file 'breezy/bzr/_knit_load_data_py.py'
--- breezy/bzr/_knit_load_data_py.py 2018-11-11 04:08:32 +0000
+++ breezy/bzr/_knit_load_data_py.py 2019-04-13 22:15:31 +0000
@@ -64,7 +64,6 @@
64 raise KnitCorrupt(kndx._filename, "line %r: %s" % (rec, e))64 raise KnitCorrupt(kndx._filename, "line %r: %s" % (rec, e))
6565
66 version_id, options, pos, size = rec[:4]66 version_id, options, pos, size = rec[:4]
67 version_id = version_id
68 try:67 try:
69 pos = int(pos)68 pos = int(pos)
70 except ValueError as e:69 except ValueError as e:
7170
=== modified file 'breezy/bzr/knit.py'
--- breezy/bzr/knit.py 2018-11-12 01:41:38 +0000
+++ breezy/bzr/knit.py 2019-04-13 22:15:31 +0000
@@ -680,9 +680,6 @@
680 lines = (tuple(line.split(b' ', 1)) for line in content)680 lines = (tuple(line.split(b' ', 1)) for line in content)
681 return AnnotatedKnitContent(lines)681 return AnnotatedKnitContent(lines)
682682
683 def parse_line_delta_iter(self, lines):
684 return iter(self.parse_line_delta(lines))
685
686 def parse_line_delta(self, lines, version_id, plain=False):683 def parse_line_delta(self, lines, version_id, plain=False):
687 """Convert a line based delta into internal representation.684 """Convert a line based delta into internal representation.
688685
689686
=== modified file 'breezy/git/dir.py'
--- breezy/git/dir.py 2018-11-16 11:37:47 +0000
+++ breezy/git/dir.py 2019-04-13 22:15:31 +0000
@@ -273,11 +273,11 @@
273 for ref in self.get_refs_container().keys():273 for ref in self.get_refs_container().keys():
274 try:274 try:
275 branch_name = ref_to_branch_name(ref)275 branch_name = ref_to_branch_name(ref)
276 except ValueError:
277 continue
278 except UnicodeDecodeError:276 except UnicodeDecodeError:
279 trace.warning("Ignoring branch %r with unicode error ref", ref)277 trace.warning("Ignoring branch %r with unicode error ref", ref)
280 continue278 continue
279 except ValueError:
280 continue
281 ret[branch_name] = self.open_branch(ref=ref)281 ret[branch_name] = self.open_branch(ref=ref)
282 return ret282 return ret
283283
284284
=== modified file 'breezy/plugins/fastimport/helpers.py'
--- breezy/plugins/fastimport/helpers.py 2018-11-17 16:53:10 +0000
+++ breezy/plugins/fastimport/helpers.py 2019-04-13 22:15:31 +0000
@@ -102,8 +102,8 @@
102 try:102 try:
103 os.mkdir(location)103 os.mkdir(location)
104 except IOError as ex:104 except IOError as ex:
105 errors.BzrCommandError("Unable to create %s: %s" %105 raise errors.BzrCommandError(
106 (location, ex))106 "Unable to create %s: %s" % (location, ex))
107107
108 # Create a repository for the nominated format.108 # Create a repository for the nominated format.
109 trace.note("Creating destination repository ...")109 trace.note("Creating destination repository ...")
110110
=== modified file 'breezy/plugins/propose/launchpad.py'
--- breezy/plugins/propose/launchpad.py 2019-03-06 14:03:19 +0000
+++ breezy/plugins/propose/launchpad.py 2019-04-13 22:15:31 +0000
@@ -73,7 +73,7 @@
73 if url.startswith('lp:'):73 if url.startswith('lp:'):
74 return True74 return True
75 regex = re.compile('([a-z]*\+)*(bzr\+ssh|http|ssh|git|https)'75 regex = re.compile('([a-z]*\+)*(bzr\+ssh|http|ssh|git|https)'
76 '://(bazaar|git).*.launchpad.net')76 '://(bazaar|git).*\.launchpad\.net')
77 return bool(regex.match(url))77 return bool(regex.match(url))
7878
7979
@@ -483,7 +483,7 @@
483 prerequisite_branch=None):483 prerequisite_branch=None):
484 """Perform the submission."""484 """Perform the submission."""
485 if labels:485 if labels:
486 raise LabelsUnsupported()486 raise LabelsUnsupported(self)
487 if prerequisite_branch is not None:487 if prerequisite_branch is not None:
488 prereq = self.launchpad.branches.getByUrl(488 prereq = self.launchpad.branches.getByUrl(
489 url=prerequisite_branch.user_url)489 url=prerequisite_branch.user_url)
@@ -612,7 +612,7 @@
612 prerequisite_branch=None):612 prerequisite_branch=None):
613 """Perform the submission."""613 """Perform the submission."""
614 if labels:614 if labels:
615 raise LabelsUnsupported()615 raise LabelsUnsupported(self)
616 if prerequisite_branch is not None:616 if prerequisite_branch is not None:
617 (prereq_repo_lp, prereq_branch_lp) = (617 (prereq_repo_lp, prereq_branch_lp) = (
618 self.lp_host._get_lp_git_ref_from_branch(prerequisite_branch))618 self.lp_host._get_lp_git_ref_from_branch(prerequisite_branch))

Subscribers

People subscribed via source and target branches