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:~gz/brz/lint_E71 |
Merge into: | lp:brz |
Diff against target: |
416 lines (+37/-41) 25 files modified
breezy/bzr/check.py (+1/-1) breezy/bzr/groupcompress.py (+1/-1) breezy/bzr/inventorytree.py (+3/-3) breezy/bzr/remote.py (+1/-1) breezy/bzr/repository.py (+1/-1) breezy/bzr/smart/vfs.py (+2/-2) breezy/git/fetch.py (+1/-1) breezy/plugins/email/emailer.py (+1/-1) breezy/plugins/fastimport/helpers.py (+2/-2) breezy/plugins/fastimport/processors/generic_processor.py (+1/-1) breezy/plugins/grep/cmds.py (+2/-2) breezy/plugins/stats/cmds.py (+2/-2) breezy/plugins/weave_fmt/store/__init__.py (+1/-1) breezy/plugins/weave_fmt/workingtree.py (+1/-1) breezy/push.py (+1/-1) breezy/shelf.py (+3/-3) breezy/status.py (+1/-1) breezy/symbol_versioning.py (+1/-1) breezy/tests/__init__.py (+1/-1) breezy/tests/test_config.py (+1/-1) breezy/transport/__init__.py (+2/-2) breezy/transport/memory.py (+4/-4) setup.cfg (+0/-4) setup.py (+1/-1) tools/win32/brz_postinstall.py (+2/-2) |
To merge this branch: | bzr merge lp:~gz/brz/lint_E71 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij | Approve | ||
Review via email: mp+358946@code.launchpad.net |
Commit message
Description of the change
Fix E71* lint errors
Mostly moving nots around and a few equality to idenity check changes.
To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'breezy/bzr/check.py' | |||
2 | --- breezy/bzr/check.py 2018-11-11 04:08:32 +0000 | |||
3 | +++ breezy/bzr/check.py 2018-11-17 17:05:54 +0000 | |||
4 | @@ -268,7 +268,7 @@ | |||
5 | 268 | self.ghosts.discard(rev_id) | 268 | self.ghosts.discard(rev_id) |
6 | 269 | # Count all parents as ghosts if we haven't seen them yet. | 269 | # Count all parents as ghosts if we haven't seen them yet. |
7 | 270 | for parent in rev.parent_ids: | 270 | for parent in rev.parent_ids: |
9 | 271 | if not parent in self.planned_revisions: | 271 | if parent not in self.planned_revisions: |
10 | 272 | self.ghosts.add(parent) | 272 | self.ghosts.add(parent) |
11 | 273 | 273 | ||
12 | 274 | self.ancestors[rev_id] = tuple(rev.parent_ids) or (NULL_REVISION,) | 274 | self.ancestors[rev_id] = tuple(rev.parent_ids) or (NULL_REVISION,) |
13 | 275 | 275 | ||
14 | === modified file 'breezy/bzr/groupcompress.py' | |||
15 | --- breezy/bzr/groupcompress.py 2018-11-12 01:41:38 +0000 | |||
16 | +++ breezy/bzr/groupcompress.py 2018-11-17 17:05:54 +0000 | |||
17 | @@ -1628,7 +1628,7 @@ | |||
18 | 1628 | """See VersionedFiles.get_sha1s().""" | 1628 | """See VersionedFiles.get_sha1s().""" |
19 | 1629 | result = {} | 1629 | result = {} |
20 | 1630 | for record in self.get_record_stream(keys, 'unordered', True): | 1630 | for record in self.get_record_stream(keys, 'unordered', True): |
22 | 1631 | if record.sha1 != None: | 1631 | if record.sha1 is not None: |
23 | 1632 | result[record.key] = record.sha1 | 1632 | result[record.key] = record.sha1 |
24 | 1633 | else: | 1633 | else: |
25 | 1634 | if record.storage_kind != 'absent': | 1634 | if record.storage_kind != 'absent': |
26 | 1635 | 1635 | ||
27 | === modified file 'breezy/bzr/inventorytree.py' | |||
28 | --- breezy/bzr/inventorytree.py 2018-11-16 18:33:17 +0000 | |||
29 | +++ breezy/bzr/inventorytree.py 2018-11-17 17:05:54 +0000 | |||
30 | @@ -197,7 +197,7 @@ | |||
31 | 197 | inventory_file_ids = [] | 197 | inventory_file_ids = [] |
32 | 198 | for path in specific_files: | 198 | for path in specific_files: |
33 | 199 | inventory, inv_file_id = self._path2inv_file_id(path) | 199 | inventory, inv_file_id = self._path2inv_file_id(path) |
35 | 200 | if not inventory is self.root_inventory: # for now | 200 | if inventory is not self.root_inventory: # for now |
36 | 201 | raise AssertionError("%r != %r" % ( | 201 | raise AssertionError("%r != %r" % ( |
37 | 202 | inventory, self.root_inventory)) | 202 | inventory, self.root_inventory)) |
38 | 203 | inventory_file_ids.append(inv_file_id) | 203 | inventory_file_ids.append(inv_file_id) |
39 | @@ -917,9 +917,9 @@ | |||
40 | 917 | changed_file_ids = set(changed_file_ids) | 917 | changed_file_ids = set(changed_file_ids) |
41 | 918 | for relpath, entry in self.target.root_inventory.iter_entries(): | 918 | for relpath, entry in self.target.root_inventory.iter_entries(): |
42 | 919 | if (specific_file_ids is not None and | 919 | if (specific_file_ids is not None and |
44 | 920 | not entry.file_id in specific_file_ids): | 920 | entry.file_id not in specific_file_ids): |
45 | 921 | continue | 921 | continue |
47 | 922 | if not entry.file_id in changed_file_ids: | 922 | if entry.file_id not in changed_file_ids: |
48 | 923 | yield (entry.file_id, | 923 | yield (entry.file_id, |
49 | 924 | (relpath, relpath), # Not renamed | 924 | (relpath, relpath), # Not renamed |
50 | 925 | False, # Not modified | 925 | False, # Not modified |
51 | 926 | 926 | ||
52 | === modified file 'breezy/bzr/remote.py' | |||
53 | --- breezy/bzr/remote.py 2018-11-11 04:08:32 +0000 | |||
54 | +++ breezy/bzr/remote.py 2018-11-17 17:05:54 +0000 | |||
55 | @@ -2268,7 +2268,7 @@ | |||
56 | 2268 | unused.append(decompressor.unused_data) | 2268 | unused.append(decompressor.unused_data) |
57 | 2269 | unused = b"" | 2269 | unused = b"" |
58 | 2270 | while True: | 2270 | while True: |
60 | 2271 | while not b"\n" in unused: | 2271 | while b"\n" not in unused: |
61 | 2272 | try: | 2272 | try: |
62 | 2273 | unused += next(byte_stream) | 2273 | unused += next(byte_stream) |
63 | 2274 | except StopIteration: | 2274 | except StopIteration: |
64 | 2275 | 2275 | ||
65 | === modified file 'breezy/bzr/repository.py' | |||
66 | --- breezy/bzr/repository.py 2018-11-11 04:08:32 +0000 | |||
67 | +++ breezy/bzr/repository.py 2018-11-17 17:05:54 +0000 | |||
68 | @@ -135,7 +135,7 @@ | |||
69 | 135 | control_files = self._create_control_files(a_bzrdir) | 135 | control_files = self._create_control_files(a_bzrdir) |
70 | 136 | control_files.lock_write() | 136 | control_files.lock_write() |
71 | 137 | transport = control_files._transport | 137 | transport = control_files._transport |
73 | 138 | if shared == True: | 138 | if shared is True: |
74 | 139 | utf8_files += [('shared-storage', b'')] | 139 | utf8_files += [('shared-storage', b'')] |
75 | 140 | try: | 140 | try: |
76 | 141 | for dir in dirs: | 141 | for dir in dirs: |
77 | 142 | 142 | ||
78 | === modified file 'breezy/bzr/smart/vfs.py' | |||
79 | --- breezy/bzr/smart/vfs.py 2018-11-11 04:08:32 +0000 | |||
80 | +++ breezy/bzr/smart/vfs.py 2018-11-17 17:05:54 +0000 | |||
81 | @@ -46,9 +46,9 @@ | |||
82 | 46 | 46 | ||
83 | 47 | the VFS is disabled when the BRZ_NO_SMART_VFS environment variable is set. | 47 | the VFS is disabled when the BRZ_NO_SMART_VFS environment variable is set. |
84 | 48 | 48 | ||
86 | 49 | :return: True if it is enabled. | 49 | :return: ``True`` if it is enabled. |
87 | 50 | """ | 50 | """ |
89 | 51 | return not 'BRZ_NO_SMART_VFS' in os.environ | 51 | return 'BRZ_NO_SMART_VFS' not in os.environ |
90 | 52 | 52 | ||
91 | 53 | 53 | ||
92 | 54 | class VfsRequest(request.SmartServerRequest): | 54 | class VfsRequest(request.SmartServerRequest): |
93 | 55 | 55 | ||
94 | === modified file 'breezy/git/fetch.py' | |||
95 | --- breezy/git/fetch.py 2018-11-16 18:33:17 +0000 | |||
96 | +++ breezy/git/fetch.py 2018-11-17 17:05:54 +0000 | |||
97 | @@ -138,7 +138,7 @@ | |||
98 | 138 | ie.revision = ptree.get_file_revision(ppath) | 138 | ie.revision = ptree.get_file_revision(ppath) |
99 | 139 | break | 139 | break |
100 | 140 | parent_key = (file_id, ptree.get_file_revision(ppath)) | 140 | parent_key = (file_id, ptree.get_file_revision(ppath)) |
102 | 141 | if not parent_key in parent_keys: | 141 | if parent_key not in parent_keys: |
103 | 142 | parent_keys.append(parent_key) | 142 | parent_keys.append(parent_key) |
104 | 143 | if ie.revision is None: | 143 | if ie.revision is None: |
105 | 144 | # Need to store a new revision | 144 | # Need to store a new revision |
106 | 145 | 145 | ||
107 | === modified file 'breezy/plugins/email/emailer.py' | |||
108 | --- breezy/plugins/email/emailer.py 2018-11-11 04:08:32 +0000 | |||
109 | +++ breezy/plugins/email/emailer.py 2018-11-17 17:05:54 +0000 | |||
110 | @@ -247,7 +247,7 @@ | |||
111 | 247 | msg.add_inline_attachment(diff, self.diff_filename()) | 247 | msg.add_inline_attachment(diff, self.diff_filename()) |
112 | 248 | 248 | ||
113 | 249 | # Add revision_mail_headers to the headers | 249 | # Add revision_mail_headers to the headers |
115 | 250 | if header != None: | 250 | if header is None: |
116 | 251 | for k, v in header.items(): | 251 | for k, v in header.items(): |
117 | 252 | msg[k] = v | 252 | msg[k] = v |
118 | 253 | 253 | ||
119 | 254 | 254 | ||
120 | === modified file 'breezy/plugins/fastimport/helpers.py' | |||
121 | --- breezy/plugins/fastimport/helpers.py 2018-11-11 04:08:32 +0000 | |||
122 | +++ breezy/plugins/fastimport/helpers.py 2018-11-17 17:05:54 +0000 | |||
123 | @@ -121,9 +121,9 @@ | |||
124 | 121 | 121 | ||
125 | 122 | def kind_to_mode(kind, executable): | 122 | def kind_to_mode(kind, executable): |
126 | 123 | if kind == "file": | 123 | if kind == "file": |
128 | 124 | if executable == True: | 124 | if executable is True: |
129 | 125 | return stat.S_IFREG | 0o755 | 125 | return stat.S_IFREG | 0o755 |
131 | 126 | elif executable == False: | 126 | elif executable is False: |
132 | 127 | return stat.S_IFREG | 0o644 | 127 | return stat.S_IFREG | 0o644 |
133 | 128 | else: | 128 | else: |
134 | 129 | raise AssertionError("Executable %r invalid" % executable) | 129 | raise AssertionError("Executable %r invalid" % executable) |
135 | 130 | 130 | ||
136 | === modified file 'breezy/plugins/fastimport/processors/generic_processor.py' | |||
137 | --- breezy/plugins/fastimport/processors/generic_processor.py 2018-11-11 04:08:32 +0000 | |||
138 | +++ breezy/plugins/fastimport/processors/generic_processor.py 2018-11-17 17:05:54 +0000 | |||
139 | @@ -310,7 +310,7 @@ | |||
140 | 310 | marks_file.export_marks(self.params.get("export-marks"), | 310 | marks_file.export_marks(self.params.get("export-marks"), |
141 | 311 | self.cache_mgr.marks) | 311 | self.cache_mgr.marks) |
142 | 312 | 312 | ||
144 | 313 | if self.cache_mgr.reftracker.last_ref == None: | 313 | if self.cache_mgr.reftracker.last_ref is None: |
145 | 314 | """Nothing to refresh""" | 314 | """Nothing to refresh""" |
146 | 315 | return | 315 | return |
147 | 316 | 316 | ||
148 | 317 | 317 | ||
149 | === modified file 'breezy/plugins/grep/cmds.py' | |||
150 | --- breezy/plugins/grep/cmds.py 2018-11-11 04:08:32 +0000 | |||
151 | +++ breezy/plugins/grep/cmds.py 2018-11-17 17:05:54 +0000 | |||
152 | @@ -178,11 +178,11 @@ | |||
153 | 178 | raise errors.BzrCommandError('Valid values for --color are ' | 178 | raise errors.BzrCommandError('Valid values for --color are ' |
154 | 179 | '"always", "never" or "auto".') | 179 | '"always", "never" or "auto".') |
155 | 180 | 180 | ||
157 | 181 | if levels == None: | 181 | if levels is None: |
158 | 182 | levels = 1 | 182 | levels = 1 |
159 | 183 | 183 | ||
160 | 184 | print_revno = False | 184 | print_revno = False |
162 | 185 | if revision != None or levels == 0: | 185 | if revision is not None or levels == 0: |
163 | 186 | # print revision numbers as we may be showing multiple revisions | 186 | # print revision numbers as we may be showing multiple revisions |
164 | 187 | print_revno = True | 187 | print_revno = True |
165 | 188 | 188 | ||
166 | 189 | 189 | ||
167 | === modified file 'breezy/plugins/stats/cmds.py' | |||
168 | --- breezy/plugins/stats/cmds.py 2018-11-11 04:08:32 +0000 | |||
169 | +++ breezy/plugins/stats/cmds.py 2018-11-17 17:05:54 +0000 | |||
170 | @@ -311,7 +311,7 @@ | |||
171 | 311 | for delta in repository.get_deltas_for_revisions(revs): | 311 | for delta in repository.get_deltas_for_revisions(revs): |
172 | 312 | pb.update("classifying commits", i, len(revs)) | 312 | pb.update("classifying commits", i, len(revs)) |
173 | 313 | for c in classify_delta(delta): | 313 | for c in classify_delta(delta): |
175 | 314 | if not c in ret: | 314 | if c not in ret: |
176 | 315 | ret[c] = 0 | 315 | ret[c] = 0 |
177 | 316 | ret[c] += 1 | 316 | ret[c] += 1 |
178 | 317 | total += 1 | 317 | total += 1 |
179 | @@ -365,7 +365,7 @@ | |||
180 | 365 | continue | 365 | continue |
181 | 366 | for c in set(classify_delta(delta)): | 366 | for c in set(classify_delta(delta)): |
182 | 367 | for author in rev.get_apparent_authors(): | 367 | for author in rev.get_apparent_authors(): |
184 | 368 | if not author in ret[c]: | 368 | if author not in ret[c]: |
185 | 369 | ret[c][author] = 0 | 369 | ret[c][author] = 0 |
186 | 370 | ret[c][author] += 1 | 370 | ret[c][author] += 1 |
187 | 371 | 371 | ||
188 | 372 | 372 | ||
189 | === modified file 'breezy/plugins/weave_fmt/store/__init__.py' | |||
190 | --- breezy/plugins/weave_fmt/store/__init__.py 2018-11-11 04:08:32 +0000 | |||
191 | +++ breezy/plugins/weave_fmt/store/__init__.py 2018-11-17 17:05:54 +0000 | |||
192 | @@ -215,7 +215,7 @@ | |||
193 | 215 | self._check_fileid(fileid) | 215 | self._check_fileid(fileid) |
194 | 216 | if suffixes: | 216 | if suffixes: |
195 | 217 | for suffix in suffixes: | 217 | for suffix in suffixes: |
197 | 218 | if not suffix in self._suffixes: | 218 | if suffix not in self._suffixes: |
198 | 219 | raise ValueError("Unregistered suffix %r" % suffix) | 219 | raise ValueError("Unregistered suffix %r" % suffix) |
199 | 220 | self._check_fileid(suffix.encode('utf-8')) | 220 | self._check_fileid(suffix.encode('utf-8')) |
200 | 221 | else: | 221 | else: |
201 | 222 | 222 | ||
202 | === modified file 'breezy/plugins/weave_fmt/workingtree.py' | |||
203 | --- breezy/plugins/weave_fmt/workingtree.py 2018-11-11 04:08:32 +0000 | |||
204 | +++ breezy/plugins/weave_fmt/workingtree.py 2018-11-17 17:05:54 +0000 | |||
205 | @@ -234,7 +234,7 @@ | |||
206 | 234 | text = False | 234 | text = False |
207 | 235 | except errors.NoSuchFile: | 235 | except errors.NoSuchFile: |
208 | 236 | text = False | 236 | text = False |
210 | 237 | if text == False: | 237 | if text is False: |
211 | 238 | break | 238 | break |
212 | 239 | ctype = {True: 'text conflict', | 239 | ctype = {True: 'text conflict', |
213 | 240 | False: 'contents conflict'}[text] | 240 | False: 'contents conflict'}[text] |
214 | 241 | 241 | ||
215 | === modified file 'breezy/push.py' | |||
216 | --- breezy/push.py 2018-11-16 18:40:46 +0000 | |||
217 | +++ breezy/push.py 2018-11-17 17:05:54 +0000 | |||
218 | @@ -162,7 +162,7 @@ | |||
219 | 162 | " control directory, but not a branch or repository. This" | 162 | " control directory, but not a branch or repository. This" |
220 | 163 | " is an unsupported configuration. Please move the target" | 163 | " is an unsupported configuration. Please move the target" |
221 | 164 | " directory out of the way and try again.") % location) | 164 | " directory out of the way and try again.") % location) |
223 | 165 | if push_result.workingtree_updated == False: | 165 | if push_result.workingtree_updated is False: |
224 | 166 | warning("This transport does not update the working " | 166 | warning("This transport does not update the working " |
225 | 167 | "tree of: %s. See 'brz help working-trees' for " | 167 | "tree of: %s. See 'brz help working-trees' for " |
226 | 168 | "more information." % push_result.target_branch.base) | 168 | "more information." % push_result.target_branch.base) |
227 | 169 | 169 | ||
228 | === modified file 'breezy/shelf.py' | |||
229 | --- breezy/shelf.py 2018-11-16 18:33:17 +0000 | |||
230 | +++ breezy/shelf.py 2018-11-17 17:05:54 +0000 | |||
231 | @@ -109,11 +109,11 @@ | |||
232 | 109 | # Also don't shelve deletion of tree root. | 109 | # Also don't shelve deletion of tree root. |
233 | 110 | if kind[1] is None and names[0] == '': | 110 | if kind[1] is None and names[0] == '': |
234 | 111 | continue | 111 | continue |
236 | 112 | if kind[0] is None or versioned[0] == False: | 112 | if kind[0] is None or versioned[0] is False: |
237 | 113 | self.creation[file_id] = (kind[1], names[1], parents[1], | 113 | self.creation[file_id] = (kind[1], names[1], parents[1], |
238 | 114 | versioned) | 114 | versioned) |
239 | 115 | yield ('add file', file_id, kind[1], paths[1]) | 115 | yield ('add file', file_id, kind[1], paths[1]) |
241 | 116 | elif kind[1] is None or versioned[0] == False: | 116 | elif kind[1] is None or versioned[0] is False: |
242 | 117 | self.deletion[file_id] = (kind[0], names[0], parents[0], | 117 | self.deletion[file_id] = (kind[0], names[0], parents[0], |
243 | 118 | versioned) | 118 | versioned) |
244 | 119 | yield ('delete file', file_id, kind[0], paths[0]) | 119 | yield ('delete file', file_id, kind[0], paths[0]) |
245 | @@ -150,7 +150,7 @@ | |||
246 | 150 | def shelve_all(self): | 150 | def shelve_all(self): |
247 | 151 | """Shelve all changes. | 151 | """Shelve all changes. |
248 | 152 | 152 | ||
250 | 153 | :return: True if changes were shelved, False if there were no changes. | 153 | :return: ``True`` if changes were shelved, otherwise ``False``. |
251 | 154 | """ | 154 | """ |
252 | 155 | change = None | 155 | change = None |
253 | 156 | for change in self.iter_shelvable(): | 156 | for change in self.iter_shelvable(): |
254 | 157 | 157 | ||
255 | === modified file 'breezy/status.py' | |||
256 | --- breezy/status.py 2018-11-12 01:41:38 +0000 | |||
257 | +++ breezy/status.py 2018-11-17 17:05:54 +0000 | |||
258 | @@ -341,7 +341,7 @@ | |||
259 | 341 | s = old_tree.filter_unversioned_files(orig_paths) | 341 | s = old_tree.filter_unversioned_files(orig_paths) |
260 | 342 | s = new_tree.filter_unversioned_files(s) | 342 | s = new_tree.filter_unversioned_files(s) |
261 | 343 | nonexistent = [path for path in s if not new_tree.has_filename(path)] | 343 | nonexistent = [path for path in s if not new_tree.has_filename(path)] |
263 | 344 | remaining = [path for path in orig_paths if not path in nonexistent] | 344 | remaining = [path for path in orig_paths if path not in nonexistent] |
264 | 345 | # Sorting the 'remaining' list doesn't have much effect in | 345 | # Sorting the 'remaining' list doesn't have much effect in |
265 | 346 | # practice, since the various status output sections will sort | 346 | # practice, since the various status output sections will sort |
266 | 347 | # their groups individually. But for consistency of this | 347 | # their groups individually. But for consistency of this |
267 | 348 | 348 | ||
268 | === modified file 'breezy/symbol_versioning.py' | |||
269 | --- breezy/symbol_versioning.py 2018-11-12 01:41:38 +0000 | |||
270 | +++ breezy/symbol_versioning.py 2018-11-17 17:05:54 +0000 | |||
271 | @@ -79,7 +79,7 @@ | |||
272 | 79 | symbol = "%s.%s.%s" % (a_callable.__self__.__class__.__module__, | 79 | symbol = "%s.%s.%s" % (a_callable.__self__.__class__.__module__, |
273 | 80 | a_callable.__self__.__class__.__name__, | 80 | a_callable.__self__.__class__.__name__, |
274 | 81 | a_callable.__name__) | 81 | a_callable.__name__) |
276 | 82 | elif getattr(a_callable, '__qualname__', None) is not None and not '<' in a_callable.__qualname__: | 82 | elif getattr(a_callable, '__qualname__', None) is not None and '<' not in a_callable.__qualname__: |
277 | 83 | symbol = "%s.%s" % (a_callable.__module__, | 83 | symbol = "%s.%s" % (a_callable.__module__, |
278 | 84 | a_callable.__qualname__) | 84 | a_callable.__qualname__) |
279 | 85 | else: | 85 | else: |
280 | 86 | 86 | ||
281 | === modified file 'breezy/tests/__init__.py' | |||
282 | --- breezy/tests/__init__.py 2018-11-16 12:32:43 +0000 | |||
283 | +++ breezy/tests/__init__.py 2018-11-17 17:05:54 +0000 | |||
284 | @@ -4544,7 +4544,7 @@ | |||
285 | 4544 | # We don't want to fail here because some useful display will be lost | 4544 | # We don't want to fail here because some useful display will be lost |
286 | 4545 | # otherwise. Polluting the tmp dir is bad, but not giving all the | 4545 | # otherwise. Polluting the tmp dir is bad, but not giving all the |
287 | 4546 | # possible info to the test runner is even worse. | 4546 | # possible info to the test runner is even worse. |
289 | 4547 | if test_id != None: | 4547 | if test_id is not None: |
290 | 4548 | ui.ui_factory.clear_term() | 4548 | ui.ui_factory.clear_term() |
291 | 4549 | sys.stderr.write('\nWhile running: %s\n' % (test_id,)) | 4549 | sys.stderr.write('\nWhile running: %s\n' % (test_id,)) |
292 | 4550 | # Ugly, but the last thing we want here is fail, so bear with it. | 4550 | # Ugly, but the last thing we want here is fail, so bear with it. |
293 | 4551 | 4551 | ||
294 | === modified file 'breezy/tests/test_config.py' | |||
295 | --- breezy/tests/test_config.py 2018-11-11 04:08:32 +0000 | |||
296 | +++ breezy/tests/test_config.py 2018-11-17 17:05:54 +0000 | |||
297 | @@ -4597,7 +4597,7 @@ | |||
298 | 4597 | def get_credentials(self, scheme, host, port=None, user=None, | 4597 | def get_credentials(self, scheme, host, port=None, user=None, |
299 | 4598 | path=None, realm=None): | 4598 | path=None, realm=None): |
300 | 4599 | key = (scheme, host) | 4599 | key = (scheme, host) |
302 | 4600 | if not key in self._username: | 4600 | if key not in self._username: |
303 | 4601 | return None | 4601 | return None |
304 | 4602 | return {"scheme": scheme, "host": host, "port": port, | 4602 | return {"scheme": scheme, "host": host, "port": port, |
305 | 4603 | "user": self._username[key], "password": self._password[key]} | 4603 | "user": self._username[key], "password": self._password[key]} |
306 | 4604 | 4604 | ||
307 | === modified file 'breezy/transport/__init__.py' | |||
308 | --- breezy/transport/__init__.py 2018-11-11 04:08:32 +0000 | |||
309 | +++ breezy/transport/__init__.py 2018-11-17 17:05:54 +0000 | |||
310 | @@ -134,14 +134,14 @@ | |||
311 | 134 | 134 | ||
312 | 135 | 135 | ||
313 | 136 | def register_lazy_transport(prefix, module, classname): | 136 | def register_lazy_transport(prefix, module, classname): |
315 | 137 | if not prefix in transport_list_registry: | 137 | if prefix not in transport_list_registry: |
316 | 138 | register_transport_proto(prefix) | 138 | register_transport_proto(prefix) |
317 | 139 | transport_list_registry.register_lazy_transport_provider( | 139 | transport_list_registry.register_lazy_transport_provider( |
318 | 140 | prefix, module, classname) | 140 | prefix, module, classname) |
319 | 141 | 141 | ||
320 | 142 | 142 | ||
321 | 143 | def register_transport(prefix, klass): | 143 | def register_transport(prefix, klass): |
323 | 144 | if not prefix in transport_list_registry: | 144 | if prefix not in transport_list_registry: |
324 | 145 | register_transport_proto(prefix) | 145 | register_transport_proto(prefix) |
325 | 146 | transport_list_registry.register_transport_provider(prefix, klass) | 146 | transport_list_registry.register_transport_provider(prefix, klass) |
326 | 147 | 147 | ||
327 | 148 | 148 | ||
328 | === modified file 'breezy/transport/memory.py' | |||
329 | --- breezy/transport/memory.py 2018-11-11 04:08:32 +0000 | |||
330 | +++ breezy/transport/memory.py 2018-11-17 17:05:54 +0000 | |||
331 | @@ -122,7 +122,7 @@ | |||
332 | 122 | def _check_parent(self, _abspath): | 122 | def _check_parent(self, _abspath): |
333 | 123 | dir = os.path.dirname(_abspath) | 123 | dir = os.path.dirname(_abspath) |
334 | 124 | if dir != '/': | 124 | if dir != '/': |
336 | 125 | if not dir in self._dirs: | 125 | if dir not in self._dirs: |
337 | 126 | raise NoSuchFile(_abspath) | 126 | raise NoSuchFile(_abspath) |
338 | 127 | 127 | ||
339 | 128 | def has(self, relpath): | 128 | def has(self, relpath): |
340 | @@ -135,7 +135,7 @@ | |||
341 | 135 | def delete(self, relpath): | 135 | def delete(self, relpath): |
342 | 136 | """See Transport.delete().""" | 136 | """See Transport.delete().""" |
343 | 137 | _abspath = self._abspath(relpath) | 137 | _abspath = self._abspath(relpath) |
345 | 138 | if not _abspath in self._files: | 138 | if _abspath not in self._files: |
346 | 139 | raise NoSuchFile(relpath) | 139 | raise NoSuchFile(relpath) |
347 | 140 | del self._files[_abspath] | 140 | del self._files[_abspath] |
348 | 141 | 141 | ||
349 | @@ -148,7 +148,7 @@ | |||
350 | 148 | def get(self, relpath): | 148 | def get(self, relpath): |
351 | 149 | """See Transport.get().""" | 149 | """See Transport.get().""" |
352 | 150 | _abspath = self._abspath(relpath) | 150 | _abspath = self._abspath(relpath) |
354 | 151 | if not _abspath in self._files: | 151 | if _abspath not in self._files: |
355 | 152 | if _abspath in self._dirs: | 152 | if _abspath in self._dirs: |
356 | 153 | return LateReadError(relpath) | 153 | return LateReadError(relpath) |
357 | 154 | else: | 154 | else: |
358 | @@ -255,7 +255,7 @@ | |||
359 | 255 | if path.startswith(_abspath + '/') and path != _abspath: | 255 | if path.startswith(_abspath + '/') and path != _abspath: |
360 | 256 | self._translate_error( | 256 | self._translate_error( |
361 | 257 | IOError(errno.ENOTEMPTY, relpath), relpath) | 257 | IOError(errno.ENOTEMPTY, relpath), relpath) |
363 | 258 | if not _abspath in self._dirs: | 258 | if _abspath not in self._dirs: |
364 | 259 | raise NoSuchFile(relpath) | 259 | raise NoSuchFile(relpath) |
365 | 260 | del self._dirs[_abspath] | 260 | del self._dirs[_abspath] |
366 | 261 | 261 | ||
367 | 262 | 262 | ||
368 | === modified file 'setup.cfg' | |||
369 | --- setup.cfg 2018-11-17 16:19:11 +0000 | |||
370 | +++ setup.cfg 2018-11-17 17:05:54 +0000 | |||
371 | @@ -24,10 +24,6 @@ | |||
372 | 24 | E502 | 24 | E502 |
373 | 25 | E702 | 25 | E702 |
374 | 26 | E704 | 26 | E704 |
375 | 27 | E711 | ||
376 | 28 | E712 | ||
377 | 29 | E713 | ||
378 | 30 | E714 | ||
379 | 31 | E722 | 27 | E722 |
380 | 32 | E731 | 28 | E731 |
381 | 33 | E741 | 29 | E741 |
382 | 34 | 30 | ||
383 | === modified file 'setup.py' | |||
384 | --- setup.py 2018-11-16 13:15:40 +0000 | |||
385 | +++ setup.py 2018-11-17 17:05:54 +0000 | |||
386 | @@ -743,7 +743,7 @@ | |||
387 | 743 | else: | 743 | else: |
388 | 744 | # ad-hoc for easy_install | 744 | # ad-hoc for easy_install |
389 | 745 | DATA_FILES = [] | 745 | DATA_FILES = [] |
391 | 746 | if not 'bdist_egg' in sys.argv: | 746 | if 'bdist_egg' not in sys.argv: |
392 | 747 | # generate and install brz.1 only with plain install, not the | 747 | # generate and install brz.1 only with plain install, not the |
393 | 748 | # easy_install one | 748 | # easy_install one |
394 | 749 | DATA_FILES = [('man/man1', ['brz.1', 'breezy/git/git-remote-bzr.1'])] | 749 | DATA_FILES = [('man/man1', ['brz.1', 'breezy/git/git-remote-bzr.1'])] |
395 | 750 | 750 | ||
396 | === modified file 'tools/win32/brz_postinstall.py' | |||
397 | --- tools/win32/brz_postinstall.py 2018-11-16 13:15:40 +0000 | |||
398 | +++ tools/win32/brz_postinstall.py 2018-11-17 17:05:54 +0000 | |||
399 | @@ -239,7 +239,7 @@ | |||
400 | 239 | _winreg.SetValueEx(hkey, 'Path', 0, type_, path_u) | 239 | _winreg.SetValueEx(hkey, 'Path', 0, type_, path_u) |
401 | 240 | _winreg.FlushKey(hkey) | 240 | _winreg.FlushKey(hkey) |
402 | 241 | 241 | ||
404 | 242 | if not hkey is None: | 242 | if hkey not is None: |
405 | 243 | _winreg.CloseKey(hkey) | 243 | _winreg.CloseKey(hkey) |
406 | 244 | 244 | ||
407 | 245 | if (add_path or delete_path) and winver == 'Windows 98': | 245 | if (add_path or delete_path) and winver == 'Windows 98': |
408 | @@ -305,7 +305,7 @@ | |||
409 | 305 | 'EnvironmentError', | 305 | 'EnvironmentError', |
410 | 306 | MB_OK | MB_ICONERROR) | 306 | MB_OK | MB_ICONERROR) |
411 | 307 | 307 | ||
413 | 308 | if not hkey is None: | 308 | if hkey not is None: |
414 | 309 | _winreg.SetValue(hkey, '', _winreg.REG_SZ, 'Brz Here') | 309 | _winreg.SetValue(hkey, '', _winreg.REG_SZ, 'Brz Here') |
415 | 310 | hkey2 = _winreg.CreateKey(hkey, 'command') | 310 | hkey2 = _winreg.CreateKey(hkey, 'command') |
416 | 311 | _winreg.SetValue(hkey2, '', _winreg.REG_SZ, | 311 | _winreg.SetValue(hkey2, '', _winreg.REG_SZ, |