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
1=== modified file 'breezy/bundle/serializer/v08.py'
2--- breezy/bundle/serializer/v08.py 2018-11-29 23:42:41 +0000
3+++ breezy/bundle/serializer/v08.py 2019-04-13 22:15:31 +0000
4@@ -78,10 +78,7 @@
5 if len(prop) == 1:
6 p_texts.append(prop[0])
7 else:
8- try:
9- p_texts.append('%s:%s' % prop)
10- except:
11- raise repr(prop)
12+ p_texts.append('%s:%s' % prop)
13 text = ['=== ']
14 text.append(' // '.join(p_texts))
15 text_line = ''.join(text).encode('utf-8')
16
17=== modified file 'breezy/bzr/_knit_load_data_py.py'
18--- breezy/bzr/_knit_load_data_py.py 2018-11-11 04:08:32 +0000
19+++ breezy/bzr/_knit_load_data_py.py 2019-04-13 22:15:31 +0000
20@@ -64,7 +64,6 @@
21 raise KnitCorrupt(kndx._filename, "line %r: %s" % (rec, e))
22
23 version_id, options, pos, size = rec[:4]
24- version_id = version_id
25 try:
26 pos = int(pos)
27 except ValueError as e:
28
29=== modified file 'breezy/bzr/knit.py'
30--- breezy/bzr/knit.py 2018-11-12 01:41:38 +0000
31+++ breezy/bzr/knit.py 2019-04-13 22:15:31 +0000
32@@ -680,9 +680,6 @@
33 lines = (tuple(line.split(b' ', 1)) for line in content)
34 return AnnotatedKnitContent(lines)
35
36- def parse_line_delta_iter(self, lines):
37- return iter(self.parse_line_delta(lines))
38-
39 def parse_line_delta(self, lines, version_id, plain=False):
40 """Convert a line based delta into internal representation.
41
42
43=== modified file 'breezy/git/dir.py'
44--- breezy/git/dir.py 2018-11-16 11:37:47 +0000
45+++ breezy/git/dir.py 2019-04-13 22:15:31 +0000
46@@ -273,11 +273,11 @@
47 for ref in self.get_refs_container().keys():
48 try:
49 branch_name = ref_to_branch_name(ref)
50- except ValueError:
51- continue
52 except UnicodeDecodeError:
53 trace.warning("Ignoring branch %r with unicode error ref", ref)
54 continue
55+ except ValueError:
56+ continue
57 ret[branch_name] = self.open_branch(ref=ref)
58 return ret
59
60
61=== modified file 'breezy/plugins/fastimport/helpers.py'
62--- breezy/plugins/fastimport/helpers.py 2018-11-17 16:53:10 +0000
63+++ breezy/plugins/fastimport/helpers.py 2019-04-13 22:15:31 +0000
64@@ -102,8 +102,8 @@
65 try:
66 os.mkdir(location)
67 except IOError as ex:
68- errors.BzrCommandError("Unable to create %s: %s" %
69- (location, ex))
70+ raise errors.BzrCommandError(
71+ "Unable to create %s: %s" % (location, ex))
72
73 # Create a repository for the nominated format.
74 trace.note("Creating destination repository ...")
75
76=== modified file 'breezy/plugins/propose/launchpad.py'
77--- breezy/plugins/propose/launchpad.py 2019-03-06 14:03:19 +0000
78+++ breezy/plugins/propose/launchpad.py 2019-04-13 22:15:31 +0000
79@@ -73,7 +73,7 @@
80 if url.startswith('lp:'):
81 return True
82 regex = re.compile('([a-z]*\+)*(bzr\+ssh|http|ssh|git|https)'
83- '://(bazaar|git).*.launchpad.net')
84+ '://(bazaar|git).*\.launchpad\.net')
85 return bool(regex.match(url))
86
87
88@@ -483,7 +483,7 @@
89 prerequisite_branch=None):
90 """Perform the submission."""
91 if labels:
92- raise LabelsUnsupported()
93+ raise LabelsUnsupported(self)
94 if prerequisite_branch is not None:
95 prereq = self.launchpad.branches.getByUrl(
96 url=prerequisite_branch.user_url)
97@@ -612,7 +612,7 @@
98 prerequisite_branch=None):
99 """Perform the submission."""
100 if labels:
101- raise LabelsUnsupported()
102+ raise LabelsUnsupported(self)
103 if prerequisite_branch is not None:
104 (prereq_repo_lp, prereq_branch_lp) = (
105 self.lp_host._get_lp_git_ref_from_branch(prerequisite_branch))

Subscribers

People subscribed via source and target branches