Status: | Merged |
---|---|
Merge reported by: | Jelmer Vernooij |
Merged at revision: | not available |
Proposed branch: | lp:~gz/brz/ws_comma |
Merge into: | lp:brz |
Diff against target: |
4896 lines (+822/-822) 138 files modified
breezy/_readdir_py.py (+7/-7) breezy/_static_tuple_py.py (+1/-1) breezy/annotate.py (+3/-3) breezy/branch.py (+1/-1) breezy/builtins.py (+1/-1) breezy/bundle/apply_bundle.py (+1/-1) breezy/bundle/bundle_data.py (+2/-2) breezy/bzr/chk_map.py (+2/-2) breezy/bzr/dirstate.py (+4/-4) breezy/bzr/groupcompress_repo.py (+1/-1) breezy/bzr/inventorytree.py (+1/-1) breezy/bzr/remote.py (+1/-1) breezy/bzr/versionedfile.py (+1/-1) breezy/bzr/vf_repository.py (+3/-3) breezy/bzr/workingtree.py (+6/-6) breezy/bzr/workingtree_4.py (+3/-3) breezy/bzr/xml_serializer.py (+5/-5) breezy/clean_tree.py (+2/-2) breezy/commands.py (+5/-5) breezy/delta.py (+3/-3) breezy/diff.py (+2/-2) breezy/doc_generate/autodoc_man.py (+4/-4) breezy/doc_generate/autodoc_rstx.py (+2/-2) breezy/filters/__init__.py (+1/-1) breezy/globbing.py (+7/-7) breezy/graph.py (+1/-1) breezy/help_topics/__init__.py (+2/-2) breezy/i18n.py (+2/-2) breezy/log.py (+6/-6) breezy/missing.py (+1/-1) breezy/osutils.py (+5/-5) breezy/patiencediff.py (+1/-1) breezy/plugins/fastimport/branch_updater.py (+2/-2) breezy/plugins/fastimport/tests/test_branch_mapper.py (+1/-1) breezy/plugins/grep/grep.py (+3/-3) breezy/plugins/stats/cmds.py (+1/-1) breezy/plugins/upload/cmds.py (+1/-1) breezy/plugins/weave_fmt/test_bzrdir.py (+2/-2) breezy/repository.py (+1/-1) breezy/revisionspec.py (+1/-1) breezy/tag.py (+2/-2) breezy/tests/__init__.py (+3/-3) breezy/tests/blackbox/test_ancestry.py (+4/-4) breezy/tests/blackbox/test_branch.py (+3/-3) breezy/tests/blackbox/test_checkout.py (+1/-1) breezy/tests/blackbox/test_commit.py (+5/-5) breezy/tests/blackbox/test_exceptions.py (+1/-1) breezy/tests/blackbox/test_ignore.py (+2/-2) breezy/tests/blackbox/test_log.py (+8/-8) breezy/tests/blackbox/test_logformats.py (+1/-1) breezy/tests/blackbox/test_ls.py (+4/-4) breezy/tests/blackbox/test_merge.py (+2/-2) breezy/tests/blackbox/test_missing.py (+5/-5) breezy/tests/blackbox/test_mv.py (+16/-16) breezy/tests/blackbox/test_pull.py (+7/-7) breezy/tests/blackbox/test_push.py (+4/-4) breezy/tests/blackbox/test_remove.py (+1/-1) breezy/tests/blackbox/test_revision_history.py (+3/-3) breezy/tests/blackbox/test_revision_info.py (+1/-1) breezy/tests/blackbox/test_revno.py (+3/-3) breezy/tests/blackbox/test_selftest.py (+3/-3) breezy/tests/blackbox/test_split.py (+1/-1) breezy/tests/blackbox/test_status.py (+3/-3) breezy/tests/blackbox/test_too_much.py (+2/-2) breezy/tests/blackbox/test_update.py (+8/-8) breezy/tests/blackbox/test_versioning.py (+1/-1) breezy/tests/http_server.py (+1/-1) breezy/tests/http_utils.py (+3/-3) breezy/tests/per_branch/__init__.py (+4/-4) breezy/tests/per_intertree/__init__.py (+5/-5) breezy/tests/per_inventory/basics.py (+2/-2) breezy/tests/per_repository/__init__.py (+4/-4) breezy/tests/per_repository/test_get_parent_map.py (+3/-3) breezy/tests/per_repository_vf/test_fileid_involved.py (+8/-8) breezy/tests/per_transport.py (+4/-4) breezy/tests/per_versionedfile.py (+106/-106) breezy/tests/per_workingtree/test_remove.py (+4/-4) breezy/tests/per_workingtree/test_smart_add.py (+2/-2) breezy/tests/per_workingtree/test_walkdirs.py (+1/-1) breezy/tests/per_workingtree/test_workingtree.py (+1/-1) breezy/tests/test__known_graph.py (+56/-56) breezy/tests/test_bisect_multi.py (+2/-2) breezy/tests/test_bundle.py (+5/-5) breezy/tests/test_chk_map.py (+3/-3) breezy/tests/test_clean_tree.py (+4/-4) breezy/tests/test_config.py (+6/-6) breezy/tests/test_conflicts.py (+1/-1) breezy/tests/test_delta.py (+2/-2) breezy/tests/test_diff.py (+95/-95) breezy/tests/test_dirstate.py (+17/-17) breezy/tests/test_email_message.py (+1/-1) breezy/tests/test_eol_filters.py (+3/-3) breezy/tests/test_filters.py (+7/-7) breezy/tests/test_foreign.py (+1/-1) breezy/tests/test_generate_ids.py (+1/-1) breezy/tests/test_globbing.py (+4/-4) breezy/tests/test_graph.py (+48/-48) breezy/tests/test_help.py (+1/-1) breezy/tests/test_http.py (+18/-18) breezy/tests/test_https_ca_bundle.py (+1/-1) breezy/tests/test_index.py (+1/-1) breezy/tests/test_knit.py (+7/-7) breezy/tests/test_lazy_import.py (+32/-32) breezy/tests/test_log.py (+6/-6) breezy/tests/test_merge3.py (+23/-23) breezy/tests/test_merge_core.py (+8/-8) breezy/tests/test_missing.py (+1/-1) breezy/tests/test_msgeditor.py (+1/-1) breezy/tests/test_options.py (+11/-11) breezy/tests/test_osutils.py (+3/-3) breezy/tests/test_pack.py (+3/-3) breezy/tests/test_remote.py (+3/-3) breezy/tests/test_revision.py (+1/-1) breezy/tests/test_sampler.py (+1/-1) breezy/tests/test_selftest.py (+2/-2) breezy/tests/test_smart.py (+5/-5) breezy/tests/test_smart_transport.py (+5/-5) breezy/tests/test_strace.py (+1/-1) breezy/tests/test_textmerge.py (+1/-1) breezy/tests/test_transactions.py (+1/-1) breezy/tests/test_transform.py (+15/-15) breezy/tests/test_tree.py (+1/-1) breezy/tests/test_tsort.py (+50/-50) breezy/tests/test_vf_search.py (+2/-2) breezy/tests/test_weave.py (+2/-2) breezy/tests/test_workingtree_4.py (+1/-1) breezy/tests/test_wsgi.py (+2/-2) breezy/transport/ftp/__init__.py (+1/-1) breezy/transport/http/__init__.py (+1/-1) breezy/transport/http/_urllib2_wrappers.py (+3/-3) breezy/transport/local.py (+1/-1) breezy/transport/log.py (+1/-1) breezy/transport/sftp.py (+1/-1) breezy/tree.py (+1/-1) breezy/urlutils.py (+2/-2) breezy/util/_bencode_py.py (+3/-3) breezy/views.py (+1/-1) breezy/win32utils.py (+1/-1) |
To merge this branch: | bzr merge lp:~gz/brz/ws_comma |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij | Approve | ||
Review via email: mp+333589@code.launchpad.net |
Commit message
Apply ws_comma 2to3 fixer
Description of the change
This is just syntax related changes, but may as well apply now while we can minimise conflicts.
To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) : | # |
review:
Approve
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/_readdir_py.py' |
2 | --- breezy/_readdir_py.py 2017-02-05 17:00:29 +0000 |
3 | +++ breezy/_readdir_py.py 2017-11-12 14:04:35 +0000 |
4 | @@ -31,13 +31,13 @@ |
5 | _unknown = 'unknown' |
6 | |
7 | _formats = { |
8 | - stat.S_IFDIR:'directory', |
9 | - stat.S_IFCHR:'chardev', |
10 | - stat.S_IFBLK:'block', |
11 | - stat.S_IFREG:'file', |
12 | - stat.S_IFIFO:'fifo', |
13 | - stat.S_IFLNK:'symlink', |
14 | - stat.S_IFSOCK:'socket', |
15 | + stat.S_IFDIR: 'directory', |
16 | + stat.S_IFCHR: 'chardev', |
17 | + stat.S_IFBLK: 'block', |
18 | + stat.S_IFREG: 'file', |
19 | + stat.S_IFIFO: 'fifo', |
20 | + stat.S_IFLNK: 'symlink', |
21 | + stat.S_IFSOCK: 'socket', |
22 | } |
23 | |
24 | |
25 | |
26 | === modified file 'breezy/_static_tuple_py.py' |
27 | --- breezy/_static_tuple_py.py 2017-04-01 06:30:31 +0000 |
28 | +++ breezy/_static_tuple_py.py 2017-11-12 14:04:35 +0000 |
29 | @@ -58,7 +58,7 @@ |
30 | |
31 | def __add__(self, other): |
32 | """Concatenate self with other""" |
33 | - return StaticTuple.from_sequence(tuple.__add__(self,other)) |
34 | + return StaticTuple.from_sequence(tuple.__add__(self, other)) |
35 | |
36 | def as_tuple(self): |
37 | return tuple(self) |
38 | |
39 | === modified file 'breezy/annotate.py' |
40 | --- breezy/annotate.py 2017-07-21 13:20:17 +0000 |
41 | +++ breezy/annotate.py 2017-11-12 14:04:35 +0000 |
42 | @@ -199,11 +199,11 @@ |
43 | for origin, text in annotations: |
44 | text = text.rstrip('\r\n') |
45 | if origin == last_origin: |
46 | - (revno_str, author, date_str) = ('','','') |
47 | + (revno_str, author, date_str) = ('', '', '') |
48 | else: |
49 | last_origin = origin |
50 | if origin not in revisions: |
51 | - (revno_str, author, date_str) = ('?','?','?') |
52 | + (revno_str, author, date_str) = ('?', '?', '?') |
53 | else: |
54 | revno_str = '.'.join(str(i) for i in |
55 | revision_id_to_revno[origin]) |
56 | @@ -343,7 +343,7 @@ |
57 | output_extend = output_lines.extend |
58 | output_append = output_lines.append |
59 | # We need to see if any of the unannotated lines match |
60 | - plain_right_subset = [l for a,l in right_lines[start_right:end_right]] |
61 | + plain_right_subset = [l for a, l in right_lines[start_right:end_right]] |
62 | plain_child_subset = plain_child_lines[start_child:end_child] |
63 | match_blocks = _get_matching_blocks(plain_right_subset, plain_child_subset) |
64 | |
65 | |
66 | === modified file 'breezy/branch.py' |
67 | --- breezy/branch.py 2017-09-10 02:23:30 +0000 |
68 | +++ breezy/branch.py 2017-11-12 14:04:35 +0000 |
69 | @@ -1700,7 +1700,7 @@ |
70 | "basis revision. hooks MUST NOT modify this delta. " |
71 | " future_tree is an in-memory tree obtained from " |
72 | "CommitBuilder.revision_tree() and hooks MUST NOT modify this " |
73 | - "tree.", (0,91)) |
74 | + "tree.", (0, 91)) |
75 | self.add_hook('post_commit', |
76 | "Called in the bzr client after a commit has completed. " |
77 | "post_commit is called with (local, master, old_revno, old_revid, " |
78 | |
79 | === modified file 'breezy/builtins.py' |
80 | --- breezy/builtins.py 2017-11-11 20:31:28 +0000 |
81 | +++ breezy/builtins.py 2017-11-12 14:04:35 +0000 |
82 | @@ -4904,7 +4904,7 @@ |
83 | Option('reverse', 'Reverse the order of revisions.'), |
84 | Option('mine-only', |
85 | 'Display changes in the local branch only.'), |
86 | - Option('this' , 'Same as --mine-only.'), |
87 | + Option('this', 'Same as --mine-only.'), |
88 | Option('theirs-only', |
89 | 'Display changes in the remote branch only.'), |
90 | Option('other', 'Same as --theirs-only.'), |
91 | |
92 | === modified file 'breezy/bundle/apply_bundle.py' |
93 | --- breezy/bundle/apply_bundle.py 2017-06-08 23:30:31 +0000 |
94 | +++ breezy/bundle/apply_bundle.py 2017-11-12 14:04:35 +0000 |
95 | @@ -37,7 +37,7 @@ |
96 | try: |
97 | real_revisions = bundle_reader.real_revisions |
98 | for i, revision in enumerate(reversed(real_revisions)): |
99 | - pb.update(gettext("Install revisions"),i, len(real_revisions)) |
100 | + pb.update(gettext("Install revisions"), i, len(real_revisions)) |
101 | if repository.has_revision(revision.revision_id): |
102 | continue |
103 | cset_tree = bundle_reader.revision_tree(repository, |
104 | |
105 | === modified file 'breezy/bundle/bundle_data.py' |
106 | --- breezy/bundle/bundle_data.py 2017-06-08 23:30:31 +0000 |
107 | +++ breezy/bundle/bundle_data.py 2017-11-12 14:04:35 +0000 |
108 | @@ -535,7 +535,7 @@ |
109 | old_path = self._renamed.get(new_path) |
110 | if old_path is not None: |
111 | return old_path |
112 | - dirname,basename = os.path.split(new_path) |
113 | + dirname, basename = os.path.split(new_path) |
114 | # dirname is not '' doesn't work, because |
115 | # dirname may be a unicode entry, and is |
116 | # requires the objects to be identical |
117 | @@ -564,7 +564,7 @@ |
118 | return new_path |
119 | if new_path in self._renamed: |
120 | return None |
121 | - dirname,basename = os.path.split(old_path) |
122 | + dirname, basename = os.path.split(old_path) |
123 | if dirname != '': |
124 | new_dir = self.new_path(dirname) |
125 | if new_dir is None: |
126 | |
127 | === modified file 'breezy/bzr/chk_map.py' |
128 | --- breezy/bzr/chk_map.py 2017-06-11 13:48:12 +0000 |
129 | +++ breezy/bzr/chk_map.py 2017-11-12 14:04:35 +0000 |
130 | @@ -1012,7 +1012,7 @@ |
131 | raise AssertionError("_search_prefix should not be None") |
132 | if not prefix.startswith(self._search_prefix): |
133 | raise AssertionError("prefixes mismatch: %s must start with %s" |
134 | - % (prefix,self._search_prefix)) |
135 | + % (prefix, self._search_prefix)) |
136 | if len(prefix) != len(self._search_prefix) + 1: |
137 | raise AssertionError("prefix wrong length: len(%s) is not %d" % |
138 | (prefix, len(self._search_prefix) + 1)) |
139 | @@ -1680,7 +1680,7 @@ |
140 | for record, _, prefix_refs, items in self._read_nodes_from_store(refs): |
141 | # TODO: Use StaticTuple here? |
142 | self._all_old_items.update(items) |
143 | - refs = [r for _,r in prefix_refs if r not in all_old_chks] |
144 | + refs = [r for _, r in prefix_refs if r not in all_old_chks] |
145 | self._old_queue.extend(refs) |
146 | all_old_chks.update(refs) |
147 | |
148 | |
149 | === modified file 'breezy/bzr/dirstate.py' |
150 | --- breezy/bzr/dirstate.py 2017-08-26 13:58:53 +0000 |
151 | +++ breezy/bzr/dirstate.py 2017-11-12 14:04:35 +0000 |
152 | @@ -337,14 +337,14 @@ |
153 | b'a': 'absent', |
154 | b'f': 'file', |
155 | b'd': 'directory', |
156 | - b'l':'symlink', |
157 | + b'l': 'symlink', |
158 | b'r': 'relocated', |
159 | b't': 'tree-reference', |
160 | } |
161 | _stat_to_minikind = { |
162 | - stat.S_IFDIR:b'd', |
163 | - stat.S_IFREG:b'f', |
164 | - stat.S_IFLNK:b'l', |
165 | + stat.S_IFDIR: b'd', |
166 | + stat.S_IFREG: b'f', |
167 | + stat.S_IFLNK: b'l', |
168 | } |
169 | _to_yesno = {True: b'y', False: b'n'} # TODO profile the performance gain |
170 | # of using int conversion rather than a dict here. AND BLAME ANDREW IF |
171 | |
172 | === modified file 'breezy/bzr/groupcompress_repo.py' |
173 | --- breezy/bzr/groupcompress_repo.py 2017-08-29 13:46:58 +0000 |
174 | +++ breezy/bzr/groupcompress_repo.py 2017-11-12 14:04:35 +0000 |
175 | @@ -1361,7 +1361,7 @@ |
176 | """ |
177 | text_keys_update = text_keys.update |
178 | for record, items in interesting_nodes_iterable: |
179 | - text_keys_update([bytes_to_text_key(b) for n,b in items]) |
180 | + text_keys_update([bytes_to_text_key(b) for n, b in items]) |
181 | yield record |
182 | |
183 | |
184 | |
185 | === modified file 'breezy/bzr/inventorytree.py' |
186 | --- breezy/bzr/inventorytree.py 2017-08-29 14:45:14 +0000 |
187 | +++ breezy/bzr/inventorytree.py 2017-11-12 14:04:35 +0000 |
188 | @@ -600,7 +600,7 @@ |
189 | things_to_add.append((subp, sub_invp, None, this_ie)) |
190 | |
191 | |
192 | -class InventoryRevisionTree(RevisionTree,InventoryTree): |
193 | +class InventoryRevisionTree(RevisionTree, InventoryTree): |
194 | |
195 | def __init__(self, repository, inv, revision_id): |
196 | RevisionTree.__init__(self, repository, revision_id) |
197 | |
198 | === modified file 'breezy/bzr/remote.py' |
199 | --- breezy/bzr/remote.py 2017-08-29 13:46:58 +0000 |
200 | +++ breezy/bzr/remote.py 2017-11-12 14:04:35 +0000 |
201 | @@ -264,7 +264,7 @@ |
202 | response = client.call('BzrDirFormat.initialize_ex_1.16', |
203 | request_network_name, path, *args) |
204 | except errors.UnknownSmartMethod: |
205 | - client._medium._remember_remote_is_before((1,16)) |
206 | + client._medium._remember_remote_is_before((1, 16)) |
207 | local_dir_format = _mod_bzrdir.BzrDirMetaFormat1() |
208 | self._supply_sub_formats_to(local_dir_format) |
209 | return local_dir_format.initialize_on_transport_ex(transport, |
210 | |
211 | === modified file 'breezy/bzr/versionedfile.py' |
212 | --- breezy/bzr/versionedfile.py 2017-11-11 15:06:09 +0000 |
213 | +++ breezy/bzr/versionedfile.py 2017-11-12 14:04:35 +0000 |
214 | @@ -1363,7 +1363,7 @@ |
215 | def get_sha1s(self, keys): |
216 | """See VersionedFiles.get_sha1s().""" |
217 | sha1s = {} |
218 | - for prefix,suffixes, vf in self._iter_keys_vf(keys): |
219 | + for prefix, suffixes, vf in self._iter_keys_vf(keys): |
220 | vf_sha1s = vf.get_sha1s(suffixes) |
221 | for suffix, sha1 in viewitems(vf_sha1s): |
222 | sha1s[prefix + (suffix,)] = sha1 |
223 | |
224 | === modified file 'breezy/bzr/vf_repository.py' |
225 | --- breezy/bzr/vf_repository.py 2017-08-29 13:46:58 +0000 |
226 | +++ breezy/bzr/vf_repository.py 2017-11-12 14:04:35 +0000 |
227 | @@ -352,9 +352,9 @@ |
228 | change[3].revision] |
229 | parent_entries[change[2]] = { |
230 | # basis parent |
231 | - basis_entry.revision:basis_entry, |
232 | + basis_entry.revision: basis_entry, |
233 | # this parent |
234 | - change[3].revision:change[3], |
235 | + change[3].revision: change[3], |
236 | } |
237 | else: |
238 | merged_ids[change[2]] = [change[3].revision] |
239 | @@ -1565,7 +1565,7 @@ |
240 | elif revision_id is None: |
241 | raise ValueError('get_parent_map(None) is not valid') |
242 | else: |
243 | - query_keys.append((revision_id ,)) |
244 | + query_keys.append((revision_id,)) |
245 | for (revision_id,), parent_keys in viewitems( |
246 | self.revisions.get_parent_map(query_keys)): |
247 | if parent_keys: |
248 | |
249 | === modified file 'breezy/bzr/workingtree.py' |
250 | --- breezy/bzr/workingtree.py 2017-09-10 02:23:30 +0000 |
251 | +++ breezy/bzr/workingtree.py 2017-11-12 14:04:35 +0000 |
252 | @@ -92,7 +92,7 @@ |
253 | CONFLICT_HEADER_1 = b"BZR conflict list format 1" |
254 | |
255 | |
256 | -class InventoryWorkingTree(WorkingTree,MutableInventoryTree): |
257 | +class InventoryWorkingTree(WorkingTree, MutableInventoryTree): |
258 | """Base class for working trees that are inventory-oriented. |
259 | |
260 | The inventory is held in the `Branch` working-inventory, and the |
261 | @@ -1179,7 +1179,7 @@ |
262 | from_tail = osutils.splitpath(from_rel)[-1] |
263 | from_inv, from_id = self._path2inv_file_id(from_rel) |
264 | if from_id is None: |
265 | - raise errors.BzrMoveFailedError(from_rel,to_dir, |
266 | + raise errors.BzrMoveFailedError(from_rel, to_dir, |
267 | errors.NotVersionedError(path=from_rel)) |
268 | |
269 | from_entry = from_inv[from_id] |
270 | @@ -1272,7 +1272,7 @@ |
271 | # check if the target changed directory and if the target directory is |
272 | # versioned |
273 | if to_dir_id is None: |
274 | - raise errors.BzrMoveFailedError(from_rel,to_rel, |
275 | + raise errors.BzrMoveFailedError(from_rel, to_rel, |
276 | errors.NotVersionedError(path=to_dir)) |
277 | |
278 | # all checks done. now we can continue with our actual work |
279 | @@ -1321,7 +1321,7 @@ |
280 | |
281 | # check the inventory for source and destination |
282 | if from_id is None: |
283 | - raise errors.BzrMoveFailedError(from_rel,to_rel, |
284 | + raise errors.BzrMoveFailedError(from_rel, to_rel, |
285 | errors.NotVersionedError(path=from_rel)) |
286 | if to_id is not None: |
287 | allowed = False |
288 | @@ -1333,14 +1333,14 @@ |
289 | rename_entry.change_id = True |
290 | allowed = True |
291 | if not allowed: |
292 | - raise errors.BzrMoveFailedError(from_rel,to_rel, |
293 | + raise errors.BzrMoveFailedError(from_rel, to_rel, |
294 | errors.AlreadyVersionedError(path=to_rel)) |
295 | |
296 | # try to determine the mode for rename (only change inv or change |
297 | # inv and file system) |
298 | if after: |
299 | if not self.has_filename(to_rel): |
300 | - raise errors.BzrMoveFailedError(from_id,to_rel, |
301 | + raise errors.BzrMoveFailedError(from_id, to_rel, |
302 | errors.NoSuchFile(path=to_rel, |
303 | extra="New file has not been created yet")) |
304 | only_change_inv = True |
305 | |
306 | === modified file 'breezy/bzr/workingtree_4.py' |
307 | --- breezy/bzr/workingtree_4.py 2017-08-29 21:03:58 +0000 |
308 | +++ breezy/bzr/workingtree_4.py 2017-11-12 14:04:35 +0000 |
309 | @@ -683,11 +683,11 @@ |
310 | to_block = state._dirblocks[to_block_index] |
311 | to_abs = self.abspath(to_dir) |
312 | if not isdir(to_abs): |
313 | - raise errors.BzrMoveFailedError('',to_dir, |
314 | + raise errors.BzrMoveFailedError('', to_dir, |
315 | errors.NotADirectory(to_abs)) |
316 | |
317 | if to_entry[1][0][0] != 'd': |
318 | - raise errors.BzrMoveFailedError('',to_dir, |
319 | + raise errors.BzrMoveFailedError('', to_dir, |
320 | errors.NotADirectory(to_abs)) |
321 | |
322 | if self._inventory is not None: |
323 | @@ -733,7 +733,7 @@ |
324 | from_dirname, from_tail_utf8 = osutils.split(from_rel_utf8) |
325 | from_entry = self._get_entry(path=from_rel) |
326 | if from_entry == (None, None): |
327 | - raise errors.BzrMoveFailedError(from_rel,to_dir, |
328 | + raise errors.BzrMoveFailedError(from_rel, to_dir, |
329 | errors.NotVersionedError(path=from_rel)) |
330 | |
331 | from_id = from_entry[0][2] |
332 | |
333 | === modified file 'breezy/bzr/xml_serializer.py' |
334 | --- breezy/bzr/xml_serializer.py 2017-06-11 13:48:12 +0000 |
335 | +++ breezy/bzr/xml_serializer.py 2017-11-12 14:04:35 +0000 |
336 | @@ -158,11 +158,11 @@ |
337 | |
338 | |
339 | _xml_escape_map = { |
340 | - "&":'&', |
341 | - "'":"'", # FIXME: overkill |
342 | - "\"":""", |
343 | - "<":"<", |
344 | - ">":">", |
345 | + "&": '&', |
346 | + "'": "'", # FIXME: overkill |
347 | + "\"": """, |
348 | + "<": "<", |
349 | + ">": ">", |
350 | } |
351 | |
352 | |
353 | |
354 | === modified file 'breezy/clean_tree.py' |
355 | --- breezy/clean_tree.py 2017-08-26 13:58:53 +0000 |
356 | +++ breezy/clean_tree.py 2017-11-12 14:04:35 +0000 |
357 | @@ -83,12 +83,12 @@ |
358 | try: |
359 | controldir.ControlDir.open(path) |
360 | except errors.NotBranchError: |
361 | - result.append((path,subp)) |
362 | + result.append((path, subp)) |
363 | else: |
364 | # TODO may be we need to notify user about skipped directories? |
365 | pass |
366 | else: |
367 | - result.append((path,subp)) |
368 | + result.append((path, subp)) |
369 | return result |
370 | |
371 | |
372 | |
373 | === modified file 'breezy/commands.py' |
374 | --- breezy/commands.py 2017-08-29 21:07:17 +0000 |
375 | +++ breezy/commands.py 2017-11-12 14:04:35 +0000 |
376 | @@ -187,7 +187,7 @@ |
377 | |
378 | |
379 | def _unsquish_command_name(cmd): |
380 | - return cmd[4:].replace('_','-') |
381 | + return cmd[4:].replace('_', '-') |
382 | |
383 | |
384 | def _register_builtin_commands(): |
385 | @@ -559,7 +559,7 @@ |
386 | doc = gettext("No help for this command.") |
387 | |
388 | # Extract the summary (purpose) and sections out from the text |
389 | - purpose,sections,order = self._get_help_parts(doc) |
390 | + purpose, sections, order = self._get_help_parts(doc) |
391 | |
392 | # If a custom usage section was provided, use it |
393 | if 'Usage' in sections: |
394 | @@ -670,14 +670,14 @@ |
395 | summary = lines.pop(0) |
396 | sections = {} |
397 | order = [] |
398 | - label,section = None,'' |
399 | + label, section = None, '' |
400 | for line in lines: |
401 | if line.startswith(':') and line.endswith(':') and len(line) > 2: |
402 | save_section(sections, order, label, section) |
403 | - label,section = line[1:-1],'' |
404 | + label, section = line[1:-1], '' |
405 | elif (label is not None) and len(line) > 1 and not line[0].isspace(): |
406 | save_section(sections, order, label, section) |
407 | - label,section = None,line |
408 | + label, section = None, line |
409 | else: |
410 | if len(section) > 0: |
411 | section += '\n' + line |
412 | |
413 | === modified file 'breezy/delta.py' |
414 | --- breezy/delta.py 2017-05-24 20:47:06 +0000 |
415 | +++ breezy/delta.py 2017-11-12 14:04:35 +0000 |
416 | @@ -314,9 +314,9 @@ |
417 | :param reporter: The _ChangeReporter that will report the changes. |
418 | """ |
419 | versioned_change_map = { |
420 | - (True, True) : 'unchanged', |
421 | - (True, False) : 'removed', |
422 | - (False, True) : 'added', |
423 | + (True, True): 'unchanged', |
424 | + (True, False): 'removed', |
425 | + (False, True): 'added', |
426 | (False, False): 'unversioned', |
427 | } |
428 | for (file_id, path, content_change, versioned, parent_id, name, kind, |
429 | |
430 | === modified file 'breezy/diff.py' |
431 | --- breezy/diff.py 2017-08-26 13:58:53 +0000 |
432 | +++ breezy/diff.py 2017-11-12 14:04:35 +0000 |
433 | @@ -237,7 +237,7 @@ |
434 | diffcmd.extend(diff_opts) |
435 | |
436 | pipe = _spawn_external_diff(diffcmd, capture_errors=True) |
437 | - out,err = pipe.communicate() |
438 | + out, err = pipe.communicate() |
439 | rc = pipe.returncode |
440 | |
441 | # internal_diff() adds a trailing newline, add one here for consistency |
442 | @@ -699,7 +699,7 @@ |
443 | except errors.BinaryFile: |
444 | self.to_file.write( |
445 | ("Binary files %s and %s differ\n" % |
446 | - (from_label, to_label)).encode(self.path_encoding,'replace')) |
447 | + (from_label, to_label)).encode(self.path_encoding, 'replace')) |
448 | return self.CHANGED |
449 | |
450 | |
451 | |
452 | === modified file 'breezy/doc_generate/autodoc_man.py' |
453 | --- breezy/doc_generate/autodoc_man.py 2017-07-30 16:59:50 +0000 |
454 | +++ breezy/doc_generate/autodoc_man.py 2017-11-12 14:04:35 +0000 |
455 | @@ -62,10 +62,10 @@ |
456 | |
457 | def man_escape(string): |
458 | """Escapes strings for man page compatibility""" |
459 | - result = string.replace("\\","\\\\") |
460 | - result = result.replace("`","\\'") |
461 | - result = result.replace("'","\\*(Aq") |
462 | - result = result.replace("-","\\-") |
463 | + result = string.replace("\\", "\\\\") |
464 | + result = result.replace("`", "\\'") |
465 | + result = result.replace("'", "\\*(Aq") |
466 | + result = result.replace("-", "\\-") |
467 | return result |
468 | |
469 | |
470 | |
471 | === modified file 'breezy/doc_generate/autodoc_rstx.py' |
472 | --- breezy/doc_generate/autodoc_rstx.py 2017-06-02 21:28:05 +0000 |
473 | +++ breezy/doc_generate/autodoc_rstx.py 2017-11-12 14:04:35 +0000 |
474 | @@ -41,8 +41,8 @@ |
475 | tt = breezy.osutils.gmtime() |
476 | params = \ |
477 | { "brzcmd": options.brz_name, |
478 | - "datestamp": time.strftime("%Y-%m-%d",tt), |
479 | - "timestamp": time.strftime("%Y-%m-%d %H:%M:%S +0000",tt), |
480 | + "datestamp": time.strftime("%Y-%m-%d", tt), |
481 | + "timestamp": time.strftime("%Y-%m-%d %H:%M:%S +0000", tt), |
482 | "version": breezy.__version__, |
483 | } |
484 | nominated_filename = getattr(options, 'filename', None) |
485 | |
486 | === modified file 'breezy/filters/__init__.py' |
487 | --- breezy/filters/__init__.py 2017-05-30 19:16:23 +0000 |
488 | +++ breezy/filters/__init__.py 2017-11-12 14:04:35 +0000 |
489 | @@ -66,7 +66,7 @@ |
490 | self.writer = writer |
491 | |
492 | def __repr__(self): |
493 | - return "reader: %s, writer: %s" % (self.reader,self.writer) |
494 | + return "reader: %s, writer: %s" % (self.reader, self.writer) |
495 | |
496 | |
497 | class ContentFilterContext(object): |
498 | |
499 | === modified file 'breezy/globbing.py' |
500 | --- breezy/globbing.py 2017-10-27 00:18:42 +0000 |
501 | +++ breezy/globbing.py 2017-11-12 14:04:35 +0000 |
502 | @@ -191,15 +191,15 @@ |
503 | pattern_types = [ "extension", "basename", "fullpath" ] |
504 | |
505 | pattern_info = { |
506 | - "extension" : { |
507 | + "extension": { |
508 | "translator" : _sub_extension, |
509 | "prefix" : r'(?:.*/)?(?!.*/)(?:.*\.)' |
510 | }, |
511 | - "basename" : { |
512 | + "basename": { |
513 | "translator" : _sub_basename, |
514 | "prefix" : r'(?:.*/)?(?!.*/)' |
515 | }, |
516 | - "fullpath" : { |
517 | + "fullpath": { |
518 | "translator" : _sub_fullpath, |
519 | "prefix" : r'' |
520 | }, |
521 | @@ -208,9 +208,9 @@ |
522 | def __init__(self, patterns): |
523 | self._regex_patterns = [] |
524 | pattern_lists = { |
525 | - "extension" : [], |
526 | - "basename" : [], |
527 | - "fullpath" : [], |
528 | + "extension": [], |
529 | + "basename": [], |
530 | + "fullpath": [], |
531 | } |
532 | for pat in patterns: |
533 | pat = normalize_pattern(pat) |
534 | @@ -302,7 +302,7 @@ |
535 | that apply under paths specified by '!' exception patterns. |
536 | """ |
537 | |
538 | - def __init__(self,patterns): |
539 | + def __init__(self, patterns): |
540 | ignores = [[], [], []] |
541 | for p in patterns: |
542 | if p.startswith(u'!!'): |
543 | |
544 | === modified file 'breezy/graph.py' |
545 | --- breezy/graph.py 2017-06-05 20:48:31 +0000 |
546 | +++ breezy/graph.py 2017-11-12 14:04:35 +0000 |
547 | @@ -1713,7 +1713,7 @@ |
548 | self._graph.add_node((revision,), [(p,) for p in parents]) |
549 | |
550 | |
551 | -_counters = [0,0,0,0,0,0,0] |
552 | +_counters = [0, 0, 0, 0, 0, 0, 0] |
553 | try: |
554 | from ._known_graph_pyx import KnownGraph |
555 | except ImportError as e: |
556 | |
557 | === modified file 'breezy/help_topics/__init__.py' |
558 | --- breezy/help_topics/__init__.py 2017-07-31 00:12:06 +0000 |
559 | +++ breezy/help_topics/__init__.py 2017-11-12 14:04:35 +0000 |
560 | @@ -195,7 +195,7 @@ |
561 | else: |
562 | # Extract out the top line summary from the body and |
563 | # clean-up the unwanted whitespace |
564 | - summary,doc = doc.split("\n", 1) |
565 | + summary, doc = doc.split("\n", 1) |
566 | #doc = indent_re.sub('', doc) |
567 | while (doc[-2:] == '\n\n' or doc[-1:] == ' '): |
568 | doc = doc[:-1] |
569 | @@ -221,7 +221,7 @@ |
570 | help_text = line_with_indent.join(help_lines) |
571 | return "%-20s%s\n" % (proto, help_text) |
572 | |
573 | - def sort_func(a,b): |
574 | + def sort_func(a, b): |
575 | a1 = a[:a.rfind("://")] |
576 | b1 = b[:b.rfind("://")] |
577 | if a1>b1: |
578 | |
579 | === modified file 'breezy/i18n.py' |
580 | --- breezy/i18n.py 2017-06-11 00:27:48 +0000 |
581 | +++ breezy/i18n.py 2017-11-12 14:04:35 +0000 |
582 | @@ -161,7 +161,7 @@ |
583 | |
584 | |
585 | def _check_win32_locale(): |
586 | - for i in ('LANGUAGE','LC_ALL','LC_MESSAGES','LANG'): |
587 | + for i in ('LANGUAGE', 'LC_ALL', 'LC_MESSAGES', 'LANG'): |
588 | if os.environ.get(i): |
589 | break |
590 | else: |
591 | @@ -196,7 +196,7 @@ |
592 | return lang |
593 | if sys.platform == 'win32': |
594 | _check_win32_locale() |
595 | - for i in ('LANGUAGE','LC_ALL','LC_MESSAGES','LANG'): |
596 | + for i in ('LANGUAGE', 'LC_ALL', 'LC_MESSAGES', 'LANG'): |
597 | lang = os.environ.get(i) |
598 | if lang: |
599 | return lang |
600 | |
601 | === modified file 'breezy/log.py' |
602 | --- breezy/log.py 2017-10-28 13:11:58 +0000 |
603 | +++ breezy/log.py 2017-11-12 14:04:35 +0000 |
604 | @@ -825,9 +825,9 @@ |
605 | """Adjust depths upwards so the top level is 0.""" |
606 | # If either the first or last revision have a merge_depth of 0, we're done |
607 | if view_revisions and view_revisions[0][2] and view_revisions[-1][2]: |
608 | - min_depth = min([d for r,n,d in view_revisions]) |
609 | + min_depth = min([d for r, n, d in view_revisions]) |
610 | if min_depth != 0: |
611 | - view_revisions = [(r,n,d-min_depth) for r,n,d in view_revisions] |
612 | + view_revisions = [(r, n, d-min_depth) for r, n, d in view_revisions] |
613 | return view_revisions |
614 | |
615 | |
616 | @@ -906,7 +906,7 @@ |
617 | } |
618 | strings[''] = [item for inner_list in strings.values() |
619 | for item in inner_list] |
620 | - for (k,v) in searchRE: |
621 | + for (k, v) in searchRE: |
622 | if k in strings and not _match_any_filter(strings[k], v): |
623 | return False |
624 | return True |
625 | @@ -1769,16 +1769,16 @@ |
626 | show_offset=False) |
627 | committer_str = self.authors(revision.rev, 'first', sep=', ') |
628 | committer_str = committer_str.replace(' <', ' <') |
629 | - to_file.write('%s %s\n\n' % (date_str,committer_str)) |
630 | + to_file.write('%s %s\n\n' % (date_str, committer_str)) |
631 | |
632 | if revision.delta is not None and revision.delta.has_changed(): |
633 | for c in revision.delta.added + revision.delta.removed + revision.delta.modified: |
634 | path, = c[:1] |
635 | to_file.write('\t* %s:\n' % (path,)) |
636 | for c in revision.delta.renamed: |
637 | - oldpath,newpath = c[:2] |
638 | + oldpath, newpath = c[:2] |
639 | # For renamed files, show both the old and the new path |
640 | - to_file.write('\t* %s:\n\t* %s:\n' % (oldpath,newpath)) |
641 | + to_file.write('\t* %s:\n\t* %s:\n' % (oldpath, newpath)) |
642 | to_file.write('\n') |
643 | |
644 | if not revision.rev.message: |
645 | |
646 | === modified file 'breezy/missing.py' |
647 | --- breezy/missing.py 2017-06-24 13:32:35 +0000 |
648 | +++ breezy/missing.py 2017-11-12 14:04:35 +0000 |
649 | @@ -206,5 +206,5 @@ |
650 | |
651 | |
652 | def sorted_revisions(revisions, history_map): |
653 | - revisions = sorted([(history_map[r],r) for r in revisions]) |
654 | + revisions = sorted([(history_map[r], r) for r in revisions]) |
655 | return revisions |
656 | |
657 | === modified file 'breezy/osutils.py' |
658 | --- breezy/osutils.py 2017-11-11 15:06:09 +0000 |
659 | +++ breezy/osutils.py 2017-11-12 14:04:35 +0000 |
660 | @@ -593,7 +593,7 @@ |
661 | F = realpath |
662 | else: |
663 | F = abspath |
664 | - [p,e] = os.path.split(f) |
665 | + [p, e] = os.path.split(f) |
666 | if e == "" or e == "." or e == "..": |
667 | return F(f) |
668 | else: |
669 | @@ -1948,9 +1948,9 @@ |
670 | link_to = os.readlink(source) |
671 | os.symlink(link_to, dest) |
672 | |
673 | - real_handlers = {'file':shutil.copy2, |
674 | - 'symlink':copy_link, |
675 | - 'directory':copy_dir, |
676 | + real_handlers = {'file': shutil.copy2, |
677 | + 'symlink': copy_link, |
678 | + 'directory': copy_dir, |
679 | } |
680 | real_handlers.update(handlers) |
681 | |
682 | @@ -1992,7 +1992,7 @@ |
683 | |
684 | This can be used to sort paths in the same way that walkdirs does. |
685 | """ |
686 | - return (dirname(path) , path) |
687 | + return (dirname(path), path) |
688 | |
689 | |
690 | def compare_paths_prefix_order(path_a, path_b): |
691 | |
692 | === modified file 'breezy/patiencediff.py' |
693 | --- breezy/patiencediff.py 2017-05-22 00:56:52 +0000 |
694 | +++ breezy/patiencediff.py 2017-11-12 14:04:35 +0000 |
695 | @@ -82,7 +82,7 @@ |
696 | tofiledate = '\t' + str(tofiledate) |
697 | |
698 | started = False |
699 | - for group in sequencematcher(None,a,b).get_grouped_opcodes(n): |
700 | + for group in sequencematcher(None, a, b).get_grouped_opcodes(n): |
701 | if not started: |
702 | yield '--- %s%s%s' % (fromfile, fromfiledate, lineterm) |
703 | yield '+++ %s%s%s' % (tofile, tofiledate, lineterm) |
704 | |
705 | === modified file 'breezy/plugins/fastimport/branch_updater.py' |
706 | --- breezy/plugins/fastimport/branch_updater.py 2017-08-26 13:58:53 +0000 |
707 | +++ breezy/plugins/fastimport/branch_updater.py 2017-11-12 14:04:35 +0000 |
708 | @@ -119,7 +119,7 @@ |
709 | location = dir_policy(name, ref_name) |
710 | try: |
711 | br = self.make_branch(location) |
712 | - branch_tips.append((br,tip)) |
713 | + branch_tips.append((br, tip)) |
714 | continue |
715 | except errors.BzrError, ex: |
716 | show_error("ERROR: failed to create branch %s: %s", |
717 | @@ -168,7 +168,7 @@ |
718 | if self.tags: |
719 | graph = self.repo.get_graph() |
720 | ancestry = [r for (r, ps) in graph.iter_ancestry([last_rev_id]) if ps is not None] |
721 | - for tag,rev in self.tags.items(): |
722 | + for tag, rev in self.tags.items(): |
723 | if rev in ancestry: |
724 | my_tags[tag] = rev |
725 | if my_tags: |
726 | |
727 | === modified file 'breezy/plugins/fastimport/tests/test_branch_mapper.py' |
728 | --- breezy/plugins/fastimport/tests/test_branch_mapper.py 2017-05-23 23:21:16 +0000 |
729 | +++ breezy/plugins/fastimport/tests/test_branch_mapper.py 2017-11-12 14:04:35 +0000 |
730 | @@ -66,6 +66,6 @@ |
731 | 'refs/remotes/origin/trunk': 'git-trunk.remote', |
732 | 'refs/heads/git-trunk': 'git-git-trunk', |
733 | 'refs/tags/git-trunk': 'git-git-trunk.tag', |
734 | - 'refs/remotes/origin/git-trunk':'git-git-trunk.remote', |
735 | + 'refs/remotes/origin/git-trunk': 'git-git-trunk.remote', |
736 | }.items(): |
737 | self.assertEqual(m.git_to_bzr(git), bzr) |
738 | |
739 | === modified file 'breezy/plugins/grep/grep.py' |
740 | --- breezy/plugins/grep/grep.py 2017-10-28 13:11:58 +0000 |
741 | +++ breezy/plugins/grep/grep.py 2017-11-12 14:04:35 +0000 |
742 | @@ -152,7 +152,7 @@ |
743 | self.get_writer = self._get_writer_fixed_highlighted |
744 | else: |
745 | flags = opts.patternc.flags |
746 | - self._sub = re.compile(pat.join(("((?:",")+)")), flags).sub |
747 | + self._sub = re.compile(pat.join(("((?:", ")+)")), flags).sub |
748 | self._highlight = color_string("\\1", FG.BOLD_RED) |
749 | self.get_writer = self._get_writer_regexp_highlighted |
750 | else: |
751 | @@ -403,7 +403,7 @@ |
752 | # setup relpath to open files relative to cwd |
753 | rpath = relpath |
754 | if relpath: |
755 | - rpath = osutils.pathjoin('..',relpath) |
756 | + rpath = osutils.pathjoin('..', relpath) |
757 | |
758 | from_dir = osutils.pathjoin(relpath, path) |
759 | if opts.from_root: |
760 | @@ -548,7 +548,7 @@ |
761 | self.get_writer = self._get_writer_fixed_highlighted |
762 | else: |
763 | flags = opts.patternc.flags |
764 | - self._sub = re.compile(pat.join(("((?:",")+)")), flags).sub |
765 | + self._sub = re.compile(pat.join(("((?:", ")+)")), flags).sub |
766 | self._highlight = color_string("\\1", FG.BOLD_RED) |
767 | self.get_writer = self._get_writer_regexp_highlighted |
768 | path_start = FG.MAGENTA |
769 | |
770 | === modified file 'breezy/plugins/stats/cmds.py' |
771 | --- breezy/plugins/stats/cmds.py 2017-08-26 23:50:59 +0000 |
772 | +++ breezy/plugins/stats/cmds.py 2017-11-12 14:04:35 +0000 |
773 | @@ -370,7 +370,7 @@ |
774 | pb = ui.ui_factory.nested_progress_bar() |
775 | try: |
776 | iterator = zip(revs, repository.get_deltas_for_revisions(revs)) |
777 | - for i, (rev,delta) in enumerate(iterator): |
778 | + for i, (rev, delta) in enumerate(iterator): |
779 | pb.update("analysing revisions", i, len(revs)) |
780 | # Don't count merges |
781 | if len(rev.parent_ids) > 1: |
782 | |
783 | === modified file 'breezy/plugins/upload/cmds.py' |
784 | --- breezy/plugins/upload/cmds.py 2017-08-26 23:50:59 +0000 |
785 | +++ breezy/plugins/upload/cmds.py 2017-11-12 14:04:35 +0000 |
786 | @@ -275,7 +275,7 @@ |
787 | |
788 | stamp = '.tmp.%.9f.%d.%d' % (time.time(), |
789 | os.getpid(), |
790 | - random.randint(0,0x7FFFFFFF)) |
791 | + random.randint(0, 0x7FFFFFFF)) |
792 | if not self.quiet: |
793 | self.outf.write('Renaming %s to %s\n' % (old_relpath, new_relpath)) |
794 | self._up_rename(old_relpath, stamp) |
795 | |
796 | === modified file 'breezy/plugins/weave_fmt/test_bzrdir.py' |
797 | --- breezy/plugins/weave_fmt/test_bzrdir.py 2017-06-20 21:55:37 +0000 |
798 | +++ breezy/plugins/weave_fmt/test_bzrdir.py 2017-11-12 14:04:35 +0000 |
799 | @@ -552,7 +552,7 @@ |
800 | |
801 | def test_bind_format_6_bzrdir(self): |
802 | # bind on a format 6 bzrdir should error |
803 | - out,err = self.run_bzr('bind ../master', retcode=3) |
804 | + out, err = self.run_bzr('bind ../master', retcode=3) |
805 | self.assertEqual('', out) |
806 | # TODO: jam 20060427 Probably something like this really should |
807 | # print out the actual path, rather than the URL |
808 | @@ -562,7 +562,7 @@ |
809 | |
810 | def test_unbind_format_6_bzrdir(self): |
811 | # bind on a format 6 bzrdir should error |
812 | - out,err = self.run_bzr('unbind', retcode=3) |
813 | + out, err = self.run_bzr('unbind', retcode=3) |
814 | self.assertEqual('', out) |
815 | cwd = urlutils.local_path_to_url(getcwd()) |
816 | self.assertEqual('brz: ERROR: To use this feature you must ' |
817 | |
818 | === modified file 'breezy/repository.py' |
819 | --- breezy/repository.py 2017-08-29 13:46:58 +0000 |
820 | +++ breezy/repository.py 2017-11-12 14:04:35 +0000 |
821 | @@ -1056,7 +1056,7 @@ |
822 | elif revision_id is None: |
823 | raise ValueError('get_parent_map(None) is not valid') |
824 | else: |
825 | - query_keys.append((revision_id ,)) |
826 | + query_keys.append((revision_id,)) |
827 | vf = self.revisions.without_fallbacks() |
828 | for (revision_id,), parent_keys in viewitems( |
829 | vf.get_parent_map(query_keys)): |
830 | |
831 | === modified file 'breezy/revisionspec.py' |
832 | --- breezy/revisionspec.py 2017-08-26 13:58:53 +0000 |
833 | +++ breezy/revisionspec.py 2017-11-12 14:04:35 +0000 |
834 | @@ -701,7 +701,7 @@ |
835 | else: |
836 | second = 0 |
837 | else: |
838 | - hour, minute, second = 0,0,0 |
839 | + hour, minute, second = 0, 0, 0 |
840 | except ValueError: |
841 | raise errors.InvalidRevisionSpec(self.user_spec, |
842 | branch, 'invalid date') |
843 | |
844 | === modified file 'breezy/tag.py' |
845 | --- breezy/tag.py 2017-08-26 13:58:53 +0000 |
846 | +++ breezy/tag.py 2017-11-12 14:04:35 +0000 |
847 | @@ -359,8 +359,8 @@ |
848 | :param tags: List of tuples with tag name and revision id. |
849 | """ |
850 | def natural_sort_key(tag): |
851 | - return [f(s) for f,s in |
852 | - zip(itertools.cycle((unicode.lower,int)), |
853 | + return [f(s) for f, s in |
854 | + zip(itertools.cycle((unicode.lower, int)), |
855 | re.split('([0-9]+)', tag[0]))] |
856 | tags.sort(key=natural_sort_key) |
857 | |
858 | |
859 | === modified file 'breezy/tests/__init__.py' |
860 | --- breezy/tests/__init__.py 2017-10-07 17:52:11 +0000 |
861 | +++ breezy/tests/__init__.py 2017-11-12 14:04:35 +0000 |
862 | @@ -1453,7 +1453,7 @@ |
863 | except excClass as e: |
864 | return e |
865 | else: |
866 | - if getattr(excClass,'__name__', None) is not None: |
867 | + if getattr(excClass, '__name__', None) is not None: |
868 | excName = excClass.__name__ |
869 | else: |
870 | excName = str(excClass) |
871 | @@ -1474,7 +1474,7 @@ |
872 | except excClass as e: |
873 | return e |
874 | else: |
875 | - if getattr(excClass,'__name__', None) is not None: |
876 | + if getattr(excClass, '__name__', None) is not None: |
877 | excName = excClass.__name__ |
878 | else: |
879 | # probably a tuple |
880 | @@ -2874,7 +2874,7 @@ |
881 | tree = workingtree.WorkingTree.open(root_path) |
882 | if not isinstance(path, (str, text_type)): |
883 | for p in path: |
884 | - self.assertNotInWorkingTree(p,tree=tree) |
885 | + self.assertNotInWorkingTree(p, tree=tree) |
886 | else: |
887 | self.assertIs(tree.path2id(path), None, path+' in working tree.') |
888 | |
889 | |
890 | === modified file 'breezy/tests/blackbox/test_ancestry.py' |
891 | --- breezy/tests/blackbox/test_ancestry.py 2017-06-10 00:17:06 +0000 |
892 | +++ breezy/tests/blackbox/test_ancestry.py 2017-11-12 14:04:35 +0000 |
893 | @@ -24,18 +24,18 @@ |
894 | a_wt = self.make_branch_and_tree('A') |
895 | self.build_tree_contents([('A/foo', '1111\n')]) |
896 | a_wt.add('foo') |
897 | - a_wt.commit('added foo',rev_id='A1') |
898 | + a_wt.commit('added foo', rev_id='A1') |
899 | |
900 | b_wt = a_wt.controldir.sprout('B').open_workingtree() |
901 | self.build_tree_contents([('B/foo', '1111\n22\n')]) |
902 | - b_wt.commit('modified B/foo',rev_id='B1') |
903 | + b_wt.commit('modified B/foo', rev_id='B1') |
904 | |
905 | self.build_tree_contents([('A/foo', '000\n1111\n')]) |
906 | - a_wt.commit('modified A/foo',rev_id='A2') |
907 | + a_wt.commit('modified A/foo', rev_id='A2') |
908 | |
909 | a_wt.merge_from_branch(b_wt.branch, b_wt.last_revision(), |
910 | b_wt.branch.get_rev_id(1)) |
911 | - a_wt.commit('merged B into A',rev_id='A3') |
912 | + a_wt.commit('merged B into A', rev_id='A3') |
913 | return a_wt, b_wt |
914 | |
915 | def _check_ancestry(self, location='', result=None): |
916 | |
917 | === modified file 'breezy/tests/blackbox/test_branch.py' |
918 | --- breezy/tests/blackbox/test_branch.py 2017-08-07 19:15:59 +0000 |
919 | +++ breezy/tests/blackbox/test_branch.py 2017-11-12 14:04:35 +0000 |
920 | @@ -91,7 +91,7 @@ |
921 | out, err = self.run_bzr('branches b') |
922 | self.assertEqual(" orig\n thiswasa\n", out) |
923 | self.assertEqual('', err) |
924 | - out,err = self.run_bzr('branch a file:b,branch=orig', retcode=3) |
925 | + out, err = self.run_bzr('branch a file:b,branch=orig', retcode=3) |
926 | self.assertEqual('', out) |
927 | self.assertEqual( |
928 | 'brz: ERROR: Already a branch: "file:b,branch=orig".\n', err) |
929 | @@ -296,7 +296,7 @@ |
930 | self.build_tree_contents([('b/hello', 'bar')]) # different content |
931 | self.build_tree_contents([('b/goodbye', 'baz')])# same content |
932 | # fails without --use-existing-dir |
933 | - out,err = self.run_bzr('branch a b', retcode=3) |
934 | + out, err = self.run_bzr('branch a b', retcode=3) |
935 | self.assertEqual('', out) |
936 | self.assertEqual('brz: ERROR: Target directory "b" already exists.\n', |
937 | err) |
938 | @@ -306,7 +306,7 @@ |
939 | self.assertPathExists('b/hello.moved') |
940 | self.assertPathDoesNotExist('b/godbye.moved') |
941 | # we can't branch into branch |
942 | - out,err = self.run_bzr('branch a b --use-existing-dir', retcode=3) |
943 | + out, err = self.run_bzr('branch a b --use-existing-dir', retcode=3) |
944 | self.assertEqual('', out) |
945 | self.assertEqual('brz: ERROR: Already a branch: "b".\n', err) |
946 | |
947 | |
948 | === modified file 'breezy/tests/blackbox/test_checkout.py' |
949 | --- breezy/tests/blackbox/test_checkout.py 2017-06-10 16:40:42 +0000 |
950 | +++ breezy/tests/blackbox/test_checkout.py 2017-11-12 14:04:35 +0000 |
951 | @@ -71,7 +71,7 @@ |
952 | self.assertPathDoesNotExist('checkout/added_in_2') |
953 | |
954 | def test_checkout_light_dash_r(self): |
955 | - out, err = self.run_bzr(['checkout','--lightweight', '-r', '-2', |
956 | + out, err = self.run_bzr(['checkout', '--lightweight', '-r', '-2', |
957 | 'branch', 'checkout']) |
958 | # the working tree should now be at revision '1' with the content |
959 | # from 1. |
960 | |
961 | === modified file 'breezy/tests/blackbox/test_commit.py' |
962 | --- breezy/tests/blackbox/test_commit.py 2017-11-11 20:41:36 +0000 |
963 | +++ breezy/tests/blackbox/test_commit.py 2017-11-12 14:04:35 +0000 |
964 | @@ -46,7 +46,7 @@ |
965 | # If forced, it should succeed, but this is not tested here. |
966 | self.make_branch_and_tree('.') |
967 | self.build_tree(['hello.txt']) |
968 | - out,err = self.run_bzr('commit -m empty', retcode=3) |
969 | + out, err = self.run_bzr('commit -m empty', retcode=3) |
970 | self.assertEqual('', out) |
971 | # Two ugly bits here. |
972 | # 1) We really don't want 'aborting commit write group' anymore. |
973 | @@ -108,7 +108,7 @@ |
974 | tree = self.make_branch_and_tree('.') |
975 | self.build_tree(['hello.txt']) |
976 | tree.add("hello.txt") |
977 | - out,err = self.run_bzr('commit -m added') |
978 | + out, err = self.run_bzr('commit -m added') |
979 | self.assertEqual('', out) |
980 | self.assertContainsRe(err, '^Committing to: .*\n' |
981 | 'added hello.txt\n' |
982 | @@ -228,7 +228,7 @@ |
983 | wt = ControlDir.create_standalone_workingtree('.') |
984 | self.build_tree(['hello.txt', 'extra.txt']) |
985 | wt.add(['hello.txt']) |
986 | - out,err = self.run_bzr('commit -m added') |
987 | + out, err = self.run_bzr('commit -m added') |
988 | self.assertEqual('', out) |
989 | self.assertContainsRe(err, '^Committing to: .*\n' |
990 | 'added hello\.txt\n' |
991 | @@ -241,7 +241,7 @@ |
992 | tree.add('unchanged.txt') |
993 | self.run_bzr('commit -m unchanged unchanged.txt') |
994 | tree.add("hello.txt") |
995 | - out,err = self.run_bzr('commit -m added') |
996 | + out, err = self.run_bzr('commit -m added') |
997 | self.assertEqual('', out) |
998 | self.assertContainsRe(err, '^Committing to: .*\n' |
999 | 'added hello\.txt\n' |
1000 | @@ -910,7 +910,7 @@ |
1001 | tree.add([u'abc\xa7/', u'abc\xa7/foo']) |
1002 | tree.commit('checkin') |
1003 | |
1004 | - tree.rename_one(u'abc\xa7','abc') |
1005 | + tree.rename_one(u'abc\xa7', 'abc') |
1006 | |
1007 | self.run_bzr('ci -m "non-ascii mv"') |
1008 | |
1009 | |
1010 | === modified file 'breezy/tests/blackbox/test_exceptions.py' |
1011 | --- breezy/tests/blackbox/test_exceptions.py 2017-06-14 22:34:05 +0000 |
1012 | +++ breezy/tests/blackbox/test_exceptions.py 2017-11-12 14:04:35 +0000 |
1013 | @@ -74,7 +74,7 @@ |
1014 | def test_nonascii_optparse(self): |
1015 | """Reasonable error raised when non-ascii in option name""" |
1016 | error_re = 'Only ASCII permitted in option names' |
1017 | - out = self.run_bzr_error([error_re], ['st',u'-\xe4']) |
1018 | + out = self.run_bzr_error([error_re], ['st', u'-\xe4']) |
1019 | |
1020 | |
1021 | class TestObsoleteRepoFormat(RepositoryFormat2a): |
1022 | |
1023 | === modified file 'breezy/tests/blackbox/test_ignore.py' |
1024 | --- breezy/tests/blackbox/test_ignore.py 2017-06-10 01:39:46 +0000 |
1025 | +++ breezy/tests/blackbox/test_ignore.py 2017-11-12 14:04:35 +0000 |
1026 | @@ -94,7 +94,7 @@ |
1027 | def test_ignore_multiple_arguments(self): |
1028 | """'ignore' works with multiple arguments""" |
1029 | tree = self.make_branch_and_tree('.') |
1030 | - self.build_tree(['a','b','c','d']) |
1031 | + self.build_tree(['a', 'b', 'c', 'd']) |
1032 | self.assertEqual(list(tree.unknowns()), ['a', 'b', 'c', 'd']) |
1033 | self.run_bzr('ignore a b c') |
1034 | self.assertEqual(list(tree.unknowns()), ['d']) |
1035 | @@ -116,7 +116,7 @@ |
1036 | |
1037 | def test_ignore_versioned_file(self): |
1038 | tree = self.make_branch_and_tree('.') |
1039 | - self.build_tree(['a','b']) |
1040 | + self.build_tree(['a', 'b']) |
1041 | tree.add('a') |
1042 | |
1043 | # test a single versioned file |
1044 | |
1045 | === modified file 'breezy/tests/blackbox/test_log.py' |
1046 | --- breezy/tests/blackbox/test_log.py 2017-07-04 20:03:11 +0000 |
1047 | +++ breezy/tests/blackbox/test_log.py 2017-11-12 14:04:35 +0000 |
1048 | @@ -328,7 +328,7 @@ |
1049 | def test_log_revno_n_path_correct_order(self): |
1050 | self.make_linear_branch('branch2') |
1051 | self.assertLogRevnos(['-rrevno:1:branch2..revno:3:branch2'], |
1052 | - ['3', '2','1']) |
1053 | + ['3', '2', '1']) |
1054 | |
1055 | def test_log_revno_n_path(self): |
1056 | self.make_linear_branch('branch2') |
1057 | @@ -718,13 +718,13 @@ |
1058 | wt.commit(message=message) |
1059 | # check that command won't fail with unicode error |
1060 | # don't care about exact output because we have other tests for this |
1061 | - out,err = self.run_bzr('log -p --long') |
1062 | - self.assertNotEqual('', out) |
1063 | - self.assertEqual('', err) |
1064 | - out,err = self.run_bzr('log -p --short') |
1065 | - self.assertNotEqual('', out) |
1066 | - self.assertEqual('', err) |
1067 | - out,err = self.run_bzr('log -p --line') |
1068 | + out, err = self.run_bzr('log -p --long') |
1069 | + self.assertNotEqual('', out) |
1070 | + self.assertEqual('', err) |
1071 | + out, err = self.run_bzr('log -p --short') |
1072 | + self.assertNotEqual('', out) |
1073 | + self.assertEqual('', err) |
1074 | + out, err = self.run_bzr('log -p --line') |
1075 | self.assertNotEqual('', out) |
1076 | self.assertEqual('', err) |
1077 | |
1078 | |
1079 | === modified file 'breezy/tests/blackbox/test_logformats.py' |
1080 | --- breezy/tests/blackbox/test_logformats.py 2017-05-21 18:10:28 +0000 |
1081 | +++ breezy/tests/blackbox/test_logformats.py 2017-11-12 14:04:35 +0000 |
1082 | @@ -41,7 +41,7 @@ |
1083 | self.fail("%s exists" % conf_path) |
1084 | |
1085 | config.ensure_config_dir_exists() |
1086 | - f = open(conf_path,'wb') |
1087 | + f = open(conf_path, 'wb') |
1088 | try: |
1089 | f.write("""[DEFAULT] |
1090 | email=Joe Foo <joe@foo.com> |
1091 | |
1092 | === modified file 'breezy/tests/blackbox/test_ls.py' |
1093 | --- breezy/tests/blackbox/test_ls.py 2017-05-21 18:10:28 +0000 |
1094 | +++ breezy/tests/blackbox/test_ls.py 2017-11-12 14:04:35 +0000 |
1095 | @@ -139,22 +139,22 @@ |
1096 | """If a path is specified, files are listed with that prefix""" |
1097 | self.build_tree(['subdir/', 'subdir/b']) |
1098 | self.wt.add(['subdir', 'subdir/b']) |
1099 | - self.ls_equals('subdir/b\n' , |
1100 | + self.ls_equals('subdir/b\n', |
1101 | 'subdir') |
1102 | self.ls_equals('../.bzrignore\n' |
1103 | '../a\n' |
1104 | '../subdir/\n' |
1105 | - '../subdir/b\n' , |
1106 | + '../subdir/b\n', |
1107 | '..', working_dir='subdir') |
1108 | self.ls_equals('../.bzrignore\0' |
1109 | '../a\0' |
1110 | '../subdir\0' |
1111 | - '../subdir/b\0' , |
1112 | + '../subdir/b\0', |
1113 | '.. --null', working_dir='subdir') |
1114 | self.ls_equals('? ../.bzrignore\n' |
1115 | '? ../a\n' |
1116 | 'V ../subdir/\n' |
1117 | - 'V ../subdir/b\n' , |
1118 | + 'V ../subdir/b\n', |
1119 | '.. --verbose', working_dir='subdir') |
1120 | self.run_bzr_error(['cannot specify both --from-root and PATH'], |
1121 | 'ls --from-root ..', working_dir='subdir') |
1122 | |
1123 | === modified file 'breezy/tests/blackbox/test_merge.py' |
1124 | --- breezy/tests/blackbox/test_merge.py 2017-06-10 00:17:06 +0000 |
1125 | +++ breezy/tests/blackbox/test_merge.py 2017-11-12 14:04:35 +0000 |
1126 | @@ -121,7 +121,7 @@ |
1127 | working_dir='a') |
1128 | self.assertTrue("Not a branch" in err) |
1129 | self.run_bzr('merge -r revno:%d:./..revno:%d:../b' |
1130 | - %(ancestor,b.revno()), working_dir='a') |
1131 | + %(ancestor, b.revno()), working_dir='a') |
1132 | self.assertEqual(a.get_parent_ids(), |
1133 | [a.branch.last_revision(), b.last_revision()]) |
1134 | self.check_file_contents('a/goodbye', 'quux') |
1135 | @@ -264,7 +264,7 @@ |
1136 | # test merge for failure without parent set |
1137 | out = self.run_bzr('merge', retcode=3, working_dir='branch_b') |
1138 | self.assertEqual(out, |
1139 | - ('','brz: ERROR: No location specified or remembered\n')) |
1140 | + ('', 'brz: ERROR: No location specified or remembered\n')) |
1141 | |
1142 | # test uncommitted changes |
1143 | self.build_tree(['branch_b/d']) |
1144 | |
1145 | === modified file 'breezy/tests/blackbox/test_missing.py' |
1146 | --- breezy/tests/blackbox/test_missing.py 2017-06-10 00:17:06 +0000 |
1147 | +++ breezy/tests/blackbox/test_missing.py 2017-11-12 14:04:35 +0000 |
1148 | @@ -171,25 +171,25 @@ |
1149 | b_tree.commit(message='b%d' % i) |
1150 | |
1151 | # local |
1152 | - out,err = self.run_bzr('missing ../b --my-revision 3', |
1153 | + out, err = self.run_bzr('missing ../b --my-revision 3', |
1154 | retcode=1, working_dir='a') |
1155 | self.assertMessages(out, ('a3', 'b2', 'b3', 'b4', 'b5'), ('a2', 'a4')) |
1156 | |
1157 | - out,err = self.run_bzr('missing ../b --my-revision 3..4', |
1158 | + out, err = self.run_bzr('missing ../b --my-revision 3..4', |
1159 | retcode=1, working_dir='a') |
1160 | self.assertMessages(out, ('a3', 'a4'), ('a2', 'a5')) |
1161 | |
1162 | #remote |
1163 | - out,err = self.run_bzr('missing ../b -r 3', |
1164 | + out, err = self.run_bzr('missing ../b -r 3', |
1165 | retcode=1, working_dir='a') |
1166 | self.assertMessages(out, ('a2', 'a3', 'a4', 'a5', 'b3'), ('b2', 'b4')) |
1167 | |
1168 | - out,err = self.run_bzr('missing ../b -r 3..4', |
1169 | + out, err = self.run_bzr('missing ../b -r 3..4', |
1170 | retcode=1, working_dir='a') |
1171 | self.assertMessages(out, ('b3', 'b4'), ('b2', 'b5')) |
1172 | |
1173 | #both |
1174 | - out,err = self.run_bzr('missing ../b --my-revision 3..4 -r 3..4', |
1175 | + out, err = self.run_bzr('missing ../b --my-revision 3..4 -r 3..4', |
1176 | retcode=1, working_dir='a') |
1177 | self.assertMessages(out, ('a3', 'a4', 'b3', 'b4'), |
1178 | ('a2', 'a5', 'b2', 'b5')) |
1179 | |
1180 | === modified file 'breezy/tests/blackbox/test_mv.py' |
1181 | --- breezy/tests/blackbox/test_mv.py 2017-10-27 09:03:47 +0000 |
1182 | +++ breezy/tests/blackbox/test_mv.py 2017-11-12 14:04:35 +0000 |
1183 | @@ -36,7 +36,7 @@ |
1184 | |
1185 | class TestMove(TestCaseWithTransport): |
1186 | |
1187 | - def assertMoved(self,from_path,to_path): |
1188 | + def assertMoved(self, from_path, to_path): |
1189 | """Assert that to_path is existing and versioned but from_path not. """ |
1190 | self.assertPathDoesNotExist(from_path) |
1191 | self.assertNotInWorkingTree(from_path) |
1192 | @@ -51,20 +51,20 @@ |
1193 | tree.add(['a', 'c', 'subdir']) |
1194 | |
1195 | self.run_bzr('mv a b') |
1196 | - self.assertMoved('a','b') |
1197 | + self.assertMoved('a', 'b') |
1198 | |
1199 | self.run_bzr('mv b subdir') |
1200 | - self.assertMoved('b','subdir/b') |
1201 | + self.assertMoved('b', 'subdir/b') |
1202 | |
1203 | self.run_bzr('mv subdir/b a') |
1204 | - self.assertMoved('subdir/b','a') |
1205 | + self.assertMoved('subdir/b', 'a') |
1206 | |
1207 | self.run_bzr('mv a c subdir') |
1208 | - self.assertMoved('a','subdir/a') |
1209 | - self.assertMoved('c','subdir/c') |
1210 | + self.assertMoved('a', 'subdir/a') |
1211 | + self.assertMoved('c', 'subdir/c') |
1212 | |
1213 | self.run_bzr('mv subdir/a subdir/newa') |
1214 | - self.assertMoved('subdir/a','subdir/newa') |
1215 | + self.assertMoved('subdir/a', 'subdir/newa') |
1216 | |
1217 | def test_mv_unversioned(self): |
1218 | self.build_tree(['unversioned.txt']) |
1219 | @@ -102,18 +102,18 @@ |
1220 | tree.add(['hello.txt', 'sub1']) |
1221 | |
1222 | self.run_bzr('mv sub1 sub2') |
1223 | - self.assertMoved('sub1','sub2') |
1224 | + self.assertMoved('sub1', 'sub2') |
1225 | |
1226 | self.run_bzr('mv hello.txt sub2') |
1227 | - self.assertMoved('hello.txt','sub2/hello.txt') |
1228 | + self.assertMoved('hello.txt', 'sub2/hello.txt') |
1229 | |
1230 | self.build_tree(['sub1/']) |
1231 | tree.add(['sub1']) |
1232 | self.run_bzr('mv sub2/hello.txt sub1') |
1233 | - self.assertMoved('sub2/hello.txt','sub1/hello.txt') |
1234 | + self.assertMoved('sub2/hello.txt', 'sub1/hello.txt') |
1235 | |
1236 | self.run_bzr('mv sub2 sub1') |
1237 | - self.assertMoved('sub2','sub1/sub2') |
1238 | + self.assertMoved('sub2', 'sub1/sub2') |
1239 | |
1240 | def test_mv_relative(self): |
1241 | self.build_tree(['sub1/', 'sub1/sub2/', 'sub1/hello.txt']) |
1242 | @@ -124,7 +124,7 @@ |
1243 | self.assertPathExists('sub1/sub2/hello.txt') |
1244 | |
1245 | self.run_bzr('mv sub2/hello.txt .', working_dir='sub1') |
1246 | - self.assertMoved('sub1/sub2/hello.txt','sub1/hello.txt') |
1247 | + self.assertMoved('sub1/sub2/hello.txt', 'sub1/hello.txt') |
1248 | |
1249 | def test_mv_change_case_file(self): |
1250 | # test for bug #77740 (mv unable change filename case on Windows) |
1251 | @@ -215,7 +215,7 @@ |
1252 | |
1253 | osutils.rename('a', 'b') |
1254 | self.run_bzr('mv a b') |
1255 | - self.assertMoved('a','b') |
1256 | + self.assertMoved('a', 'b') |
1257 | |
1258 | def test_mv_already_moved_file_to_versioned_target(self): |
1259 | """Test brz mv existing_file to versioned_file. |
1260 | @@ -252,7 +252,7 @@ |
1261 | |
1262 | osutils.rename('a', 'sub/a') |
1263 | self.run_bzr('mv a sub/a') |
1264 | - self.assertMoved('a','sub/a') |
1265 | + self.assertMoved('a', 'sub/a') |
1266 | |
1267 | def test_mv_already_moved_file_into_unversioned_subdir(self): |
1268 | """Test brz mv original_file to unversioned_directory/file. |
1269 | @@ -287,8 +287,8 @@ |
1270 | |
1271 | osutils.rename('a1', 'sub/a1') |
1272 | self.run_bzr('mv a1 a2 sub') |
1273 | - self.assertMoved('a1','sub/a1') |
1274 | - self.assertMoved('a2','sub/a2') |
1275 | + self.assertMoved('a1', 'sub/a1') |
1276 | + self.assertMoved('a2', 'sub/a2') |
1277 | |
1278 | def test_mv_already_moved_files_into_unversioned_subdir(self): |
1279 | """Test brz mv original_file to unversioned_directory. |
1280 | |
1281 | === modified file 'breezy/tests/blackbox/test_pull.py' |
1282 | --- breezy/tests/blackbox/test_pull.py 2017-08-07 19:15:59 +0000 |
1283 | +++ breezy/tests/blackbox/test_pull.py 2017-11-12 14:04:35 +0000 |
1284 | @@ -244,7 +244,7 @@ |
1285 | # test pull for failure without parent set |
1286 | out = self.run_bzr('pull', retcode=3, working_dir='branch_b') |
1287 | self.assertEqual(out, |
1288 | - ('','brz: ERROR: No pull location known or specified.\n')) |
1289 | + ('', 'brz: ERROR: No pull location known or specified.\n')) |
1290 | # test implicit --remember when no parent set, this pull conflicts |
1291 | self.build_tree(['branch_b/d']) |
1292 | tree_b.add('d') |
1293 | @@ -252,7 +252,7 @@ |
1294 | out = self.run_bzr('pull ../branch_a', retcode=3, |
1295 | working_dir='branch_b') |
1296 | self.assertEqual(out, |
1297 | - ('','brz: ERROR: These branches have diverged.' |
1298 | + ('', 'brz: ERROR: These branches have diverged.' |
1299 | ' Use the missing command to see how.\n' |
1300 | 'Use the merge command to reconcile them.\n')) |
1301 | tree_b = tree_b.controldir.open_workingtree() |
1302 | @@ -483,14 +483,14 @@ |
1303 | a_tree = self.example_branch('a') |
1304 | b_tree = a_tree.controldir.sprout('b').open_workingtree() |
1305 | |
1306 | - with open(osutils.pathjoin('a', 'hello'),'wt') as f: |
1307 | + with open(osutils.pathjoin('a', 'hello'), 'wt') as f: |
1308 | f.write('fee') |
1309 | a_tree.commit('fee') |
1310 | |
1311 | - with open(osutils.pathjoin('b', 'hello'),'wt') as f: |
1312 | + with open(osutils.pathjoin('b', 'hello'), 'wt') as f: |
1313 | f.write('fie') |
1314 | |
1315 | - out,err=self.run_bzr(['pull','-d','b','a','--show-base']) |
1316 | + out, err=self.run_bzr(['pull', '-d', 'b', 'a', '--show-base']) |
1317 | |
1318 | # check for message here |
1319 | self.assertEqual( |
1320 | @@ -509,7 +509,7 @@ |
1321 | see https://bugs.launchpad.net/bzr/+bug/1022160""" |
1322 | self.make_branch('from') |
1323 | self.make_branch('to') |
1324 | - out = self.run_bzr(['pull','-d','to','from','--show-base']) |
1325 | + out = self.run_bzr(['pull', '-d', 'to', 'from', '--show-base']) |
1326 | self.assertEqual(out, ('No revisions or tags to pull.\n', |
1327 | 'No working tree, ignoring --show-base\n')) |
1328 | |
1329 | @@ -520,7 +520,7 @@ |
1330 | from_tree.branch.tags.set_tag("mytag", "somerevid") |
1331 | to_tree = self.make_branch_and_tree('to') |
1332 | to_tree.branch.tags.set_tag("mytag", "anotherrevid") |
1333 | - out = self.run_bzr(['pull','-d','to','from'],retcode=1) |
1334 | + out = self.run_bzr(['pull', '-d', 'to', 'from'], retcode=1) |
1335 | self.assertEqual(out, |
1336 | ('No revisions to pull.\nConflicting tags:\n mytag\n', '')) |
1337 | |
1338 | |
1339 | === modified file 'breezy/tests/blackbox/test_push.py' |
1340 | --- breezy/tests/blackbox/test_push.py 2017-10-27 00:18:42 +0000 |
1341 | +++ breezy/tests/blackbox/test_push.py 2017-11-12 14:04:35 +0000 |
1342 | @@ -68,13 +68,13 @@ |
1343 | # If there is no parent location set, :parent isn't mentioned. |
1344 | out = self.run_bzr('push', working_dir='a', retcode=3) |
1345 | self.assertEqual(out, |
1346 | - ('','brz: ERROR: No push location known or specified.\n')) |
1347 | + ('', 'brz: ERROR: No push location known or specified.\n')) |
1348 | |
1349 | # If there is a parent location set, the error suggests :parent. |
1350 | tree_a.branch.set_parent(tree_b.branch.base) |
1351 | out = self.run_bzr('push', working_dir='a', retcode=3) |
1352 | self.assertEqual(out, |
1353 | - ('','brz: ERROR: No push location known or specified. ' |
1354 | + ('', 'brz: ERROR: No push location known or specified. ' |
1355 | 'To push to the parent branch ' |
1356 | '(at %s), use \'brz push :parent\'.\n' % |
1357 | urlutils.unescape_for_display(tree_b.branch.base, 'utf-8'))) |
1358 | @@ -103,7 +103,7 @@ |
1359 | # test push for failure without push location set |
1360 | out = self.run_bzr('push', working_dir='branch_a', retcode=3) |
1361 | self.assertEqual(out, |
1362 | - ('','brz: ERROR: No push location known or specified.\n')) |
1363 | + ('', 'brz: ERROR: No push location known or specified.\n')) |
1364 | |
1365 | # test not remembered if cannot actually push |
1366 | self.run_bzr('push path/which/doesnt/exist', |
1367 | @@ -117,7 +117,7 @@ |
1368 | out = self.run_bzr('push ../branch_b', |
1369 | working_dir='branch_a', retcode=3) |
1370 | self.assertEqual(out, |
1371 | - ('','brz: ERROR: These branches have diverged. ' |
1372 | + ('', 'brz: ERROR: These branches have diverged. ' |
1373 | 'See "brz help diverged-branches" for more information.\n')) |
1374 | # Refresh the branch as 'push' modified it |
1375 | branch_a = branch_a.controldir.open_branch() |
1376 | |
1377 | === modified file 'breezy/tests/blackbox/test_remove.py' |
1378 | --- breezy/tests/blackbox/test_remove.py 2017-05-21 18:10:28 +0000 |
1379 | +++ breezy/tests/blackbox/test_remove.py 2017-11-12 14:04:35 +0000 |
1380 | @@ -266,7 +266,7 @@ |
1381 | tree = WorkingTree.open('.') |
1382 | self.assertInWorkingTree(a) |
1383 | self.assertEqual(tree.path2id(a), a + _id) |
1384 | - self.assertFilesUnversioned([b,c]) |
1385 | + self.assertFilesUnversioned([b, c]) |
1386 | |
1387 | def test_remove_with_new_in_dir2(self): |
1388 | tree = self._make_tree_and_add(files) |
1389 | |
1390 | === modified file 'breezy/tests/blackbox/test_revision_history.py' |
1391 | --- breezy/tests/blackbox/test_revision_history.py 2017-05-21 18:10:28 +0000 |
1392 | +++ breezy/tests/blackbox/test_revision_history.py 2017-11-12 14:04:35 +0000 |
1393 | @@ -28,13 +28,13 @@ |
1394 | with open('test/foo', 'wb') as f: |
1395 | f.write('1111\n') |
1396 | tree.add('foo') |
1397 | - tree.commit('added foo',rev_id='revision_1') |
1398 | + tree.commit('added foo', rev_id='revision_1') |
1399 | with open('test/foo', 'wb')as f: |
1400 | f.write('2222\n') |
1401 | - tree.commit('updated foo',rev_id='revision_2') |
1402 | + tree.commit('updated foo', rev_id='revision_2') |
1403 | with open('test/foo', 'wb')as f: |
1404 | f.write('3333\n') |
1405 | - tree.commit('updated foo again',rev_id='revision_3') |
1406 | + tree.commit('updated foo again', rev_id='revision_3') |
1407 | return tree |
1408 | |
1409 | def _check_revision_history(self, location='', working_dir=None): |
1410 | |
1411 | === modified file 'breezy/tests/blackbox/test_revision_info.py' |
1412 | --- breezy/tests/blackbox/test_revision_info.py 2017-06-10 00:17:06 +0000 |
1413 | +++ breezy/tests/blackbox/test_revision_info.py 2017-11-12 14:04:35 +0000 |
1414 | @@ -110,7 +110,7 @@ |
1415 | b = self.make_branch('branch') |
1416 | |
1417 | # Try getting the --tree revision-info |
1418 | - out,err = self.run_bzr('revision-info --tree -d branch', retcode=3) |
1419 | + out, err = self.run_bzr('revision-info --tree -d branch', retcode=3) |
1420 | self.assertEqual('', out) |
1421 | self.assertEqual('brz: ERROR: No WorkingTree exists for "branch".\n', |
1422 | err) |
1423 | |
1424 | === modified file 'breezy/tests/blackbox/test_revno.py' |
1425 | --- breezy/tests/blackbox/test_revno.py 2017-05-21 18:10:28 +0000 |
1426 | +++ breezy/tests/blackbox/test_revno.py 2017-11-12 14:04:35 +0000 |
1427 | @@ -61,12 +61,12 @@ |
1428 | wt.commit('mkfile') |
1429 | |
1430 | # Make sure revno says we're on 1 |
1431 | - out,err = self.run_bzr('revno checkout') |
1432 | + out, err = self.run_bzr('revno checkout') |
1433 | self.assertEqual('', err) |
1434 | self.assertEqual('1\n', out) |
1435 | |
1436 | # Make sure --tree knows it's still on 0 |
1437 | - out,err = self.run_bzr('revno --tree checkout') |
1438 | + out, err = self.run_bzr('revno --tree checkout') |
1439 | self.assertEqual('', err) |
1440 | self.assertEqual('0\n', out) |
1441 | |
1442 | @@ -75,7 +75,7 @@ |
1443 | b = self.make_branch('branch') |
1444 | |
1445 | # Try getting it's --tree revno |
1446 | - out,err = self.run_bzr('revno --tree branch', retcode=3) |
1447 | + out, err = self.run_bzr('revno --tree branch', retcode=3) |
1448 | self.assertEqual('', out) |
1449 | self.assertEqual('brz: ERROR: No WorkingTree exists for "branch".\n', |
1450 | err) |
1451 | |
1452 | === modified file 'breezy/tests/blackbox/test_selftest.py' |
1453 | --- breezy/tests/blackbox/test_selftest.py 2017-08-27 01:58:16 +0000 |
1454 | +++ breezy/tests/blackbox/test_selftest.py 2017-11-12 14:04:35 +0000 |
1455 | @@ -125,7 +125,7 @@ |
1456 | # If the last body line is blank, drop it off the list |
1457 | if len(body) > 0 and body[-1] == '': |
1458 | body.pop() |
1459 | - return (header,body,footer) |
1460 | + return (header, body, footer) |
1461 | |
1462 | def test_list_only(self): |
1463 | # check that brz selftest --list-only outputs no ui noise |
1464 | @@ -133,8 +133,8 @@ |
1465 | """Capture the arguments selftest was run with.""" |
1466 | return True |
1467 | def outputs_nothing(cmdline): |
1468 | - out,err = self.run_bzr(cmdline) |
1469 | - (header,body,footer) = self._parse_test_list(out.splitlines()) |
1470 | + out, err = self.run_bzr(cmdline) |
1471 | + (header, body, footer) = self._parse_test_list(out.splitlines()) |
1472 | num_tests = len(body) |
1473 | self.assertLength(0, header) |
1474 | self.assertLength(0, footer) |
1475 | |
1476 | === modified file 'breezy/tests/blackbox/test_split.py' |
1477 | --- breezy/tests/blackbox/test_split.py 2017-06-10 16:40:42 +0000 |
1478 | +++ breezy/tests/blackbox/test_split.py 2017-11-12 14:04:35 +0000 |
1479 | @@ -45,7 +45,7 @@ |
1480 | self.build_tree(['tree/subtree/']) |
1481 | tree.add('subtree') |
1482 | tree.commit('added subtree') |
1483 | - self.run_bzr_error(('must upgrade your branch at .*tree','rich roots'), |
1484 | + self.run_bzr_error(('must upgrade your branch at .*tree', 'rich roots'), |
1485 | 'split tree/subtree') |
1486 | |
1487 | def split_formats(self, format, repo_format): |
1488 | |
1489 | === modified file 'breezy/tests/blackbox/test_status.py' |
1490 | --- breezy/tests/blackbox/test_status.py 2017-06-10 16:40:42 +0000 |
1491 | +++ breezy/tests/blackbox/test_status.py 2017-11-12 14:04:35 +0000 |
1492 | @@ -212,8 +212,8 @@ |
1493 | wt = self.make_branch_and_tree('.') |
1494 | b = wt.branch |
1495 | |
1496 | - self.build_tree(['directory/','directory/hello.c', |
1497 | - 'bye.c','test.c','dir2/', |
1498 | + self.build_tree(['directory/', 'directory/hello.c', |
1499 | + 'bye.c', 'test.c', 'dir2/', |
1500 | 'missing.c']) |
1501 | wt.add('directory') |
1502 | wt.add('test.c') |
1503 | @@ -242,7 +242,7 @@ |
1504 | tof = BytesIO() |
1505 | self.assertRaises(errors.PathsDoNotExist, |
1506 | show_tree_status, |
1507 | - wt, specific_files=['bye.c','test.c','absent.c'], |
1508 | + wt, specific_files=['bye.c', 'test.c', 'absent.c'], |
1509 | to_file=tof) |
1510 | |
1511 | tof = BytesIO() |
1512 | |
1513 | === modified file 'breezy/tests/blackbox/test_too_much.py' |
1514 | --- breezy/tests/blackbox/test_too_much.py 2017-05-22 00:56:52 +0000 |
1515 | +++ breezy/tests/blackbox/test_too_much.py 2017-11-12 14:04:35 +0000 |
1516 | @@ -522,14 +522,14 @@ |
1517 | self.assertEqual(listdir_sorted("."), [ "d2", "link2" ]) |
1518 | self.assertEqual(listdir_sorted("d2"), [ "link1", "link3" ]) |
1519 | self.assertEqual(os.readlink("d2/link1"), "NOWHERE1") |
1520 | - self.assertEqual(os.readlink("link2") , "NOWHERE2") |
1521 | + self.assertEqual(os.readlink("link2"), "NOWHERE2") |
1522 | chdir("..") |
1523 | |
1524 | self.run_bzr('export -r 4 exp4.tmp') |
1525 | chdir("exp4.tmp") |
1526 | self.assertEqual(listdir_sorted("."), [ "d2", "link2" ]) |
1527 | self.assertEqual(os.readlink("d2/link1"), "TARGET 1") |
1528 | - self.assertEqual(os.readlink("link2") , "TARGET 2") |
1529 | + self.assertEqual(os.readlink("link2"), "TARGET 2") |
1530 | self.assertEqual(listdir_sorted("d2"), [ "link1", "link3" ]) |
1531 | chdir("..") |
1532 | |
1533 | |
1534 | === modified file 'breezy/tests/blackbox/test_update.py' |
1535 | --- breezy/tests/blackbox/test_update.py 2017-06-10 16:40:42 +0000 |
1536 | +++ breezy/tests/blackbox/test_update.py 2017-11-12 14:04:35 +0000 |
1537 | @@ -83,7 +83,7 @@ |
1538 | self.run_bzr('add checkout/file') |
1539 | self.run_bzr('commit -m add-file checkout') |
1540 | # now branch should be out of date |
1541 | - out,err = self.run_bzr('update branch') |
1542 | + out, err = self.run_bzr('update branch') |
1543 | self.assertEqual('', out) |
1544 | self.assertEqualDiff("""+N file |
1545 | All changes applied successfully. |
1546 | @@ -101,7 +101,7 @@ |
1547 | self.run_bzr('add checkout/file') |
1548 | self.run_bzr('commit -m add-file checkout') |
1549 | # now checkout2 should be out of date |
1550 | - out,err = self.run_bzr('update checkout2') |
1551 | + out, err = self.run_bzr('update checkout2') |
1552 | self.assertEqualDiff('''+N file |
1553 | All changes applied successfully. |
1554 | Updated to revision 1 of branch %s |
1555 | @@ -127,7 +127,7 @@ |
1556 | a_file = file('checkout2/file', 'wt') |
1557 | a_file.write('Bar') |
1558 | a_file.close() |
1559 | - out,err = self.run_bzr('update checkout2', retcode=1) |
1560 | + out, err = self.run_bzr('update checkout2', retcode=1) |
1561 | self.assertEqualDiff(''' M file |
1562 | Text conflict in file |
1563 | 1 conflicts encountered. |
1564 | @@ -365,26 +365,26 @@ |
1565 | |
1566 | tree=self.make_branch_and_tree('.') |
1567 | |
1568 | - f = open('hello','wt') |
1569 | + f = open('hello', 'wt') |
1570 | f.write('foo') |
1571 | f.close() |
1572 | tree.add('hello') |
1573 | tree.commit('fie') |
1574 | |
1575 | - f = open('hello','wt') |
1576 | + f = open('hello', 'wt') |
1577 | f.write('fee') |
1578 | f.close() |
1579 | tree.commit('fee') |
1580 | |
1581 | #tree.update() gives no such revision, so ... |
1582 | - self.run_bzr(['update','-r1']) |
1583 | + self.run_bzr(['update', '-r1']) |
1584 | |
1585 | #create conflict |
1586 | - f = open('hello','wt') |
1587 | + f = open('hello', 'wt') |
1588 | f.write('fie') |
1589 | f.close() |
1590 | |
1591 | - out, err = self.run_bzr(['update','--show-base'],retcode=1) |
1592 | + out, err = self.run_bzr(['update', '--show-base'], retcode=1) |
1593 | |
1594 | # check for conflict notification |
1595 | self.assertContainsString(err, |
1596 | |
1597 | === modified file 'breezy/tests/blackbox/test_versioning.py' |
1598 | --- breezy/tests/blackbox/test_versioning.py 2017-05-21 18:10:28 +0000 |
1599 | +++ breezy/tests/blackbox/test_versioning.py 2017-11-12 14:04:35 +0000 |
1600 | @@ -79,7 +79,7 @@ |
1601 | |
1602 | self.assertEqual(len(delta.added), 2) |
1603 | self.assertEqual(delta.added[0][0], 'dir') |
1604 | - self.assertEqual(delta.added[1][0], pathjoin('dir','subdir')) |
1605 | + self.assertEqual(delta.added[1][0], pathjoin('dir', 'subdir')) |
1606 | self.assertFalse(delta.modified) |
1607 | |
1608 | def test_mkdir_w_nested_trees(self): |
1609 | |
1610 | === modified file 'breezy/tests/http_server.py' |
1611 | --- breezy/tests/http_server.py 2017-09-26 00:55:04 +0000 |
1612 | +++ breezy/tests/http_server.py 2017-11-12 14:04:35 +0000 |
1613 | @@ -229,7 +229,7 @@ |
1614 | def get_multiple_ranges(self, file, file_size, ranges): |
1615 | self.send_response(206) |
1616 | self.send_header('Accept-Ranges', 'bytes') |
1617 | - boundary = '%d' % random.randint(0,0x7FFFFFFF) |
1618 | + boundary = '%d' % random.randint(0, 0x7FFFFFFF) |
1619 | self.send_header('Content-Type', |
1620 | 'multipart/byteranges; boundary=%s' % boundary) |
1621 | boundary_line = '--%s\r\n' % boundary |
1622 | |
1623 | === modified file 'breezy/tests/http_utils.py' |
1624 | --- breezy/tests/http_utils.py 2017-09-26 00:55:04 +0000 |
1625 | +++ breezy/tests/http_utils.py 2017-11-12 14:04:35 +0000 |
1626 | @@ -216,7 +216,7 @@ |
1627 | def redirect_to(self, host, port): |
1628 | """Redirect all requests to a specific host:port""" |
1629 | self.redirections = [('(.*)', |
1630 | - r'http://%s:%s\1' % (host, port) , |
1631 | + r'http://%s:%s\1' % (host, port), |
1632 | 301)] |
1633 | |
1634 | def is_redirected(self, path): |
1635 | @@ -374,7 +374,7 @@ |
1636 | header = 'Digest realm="%s", ' % tcs.auth_realm |
1637 | header += 'nonce="%s", algorithm="%s", qop="auth"' % (tcs.auth_nonce, |
1638 | 'MD5') |
1639 | - self.send_header(tcs.auth_header_sent,header) |
1640 | + self.send_header(tcs.auth_header_sent, header) |
1641 | |
1642 | |
1643 | class DigestAndBasicAuthRequestHandler(DigestAuthRequestHandler): |
1644 | @@ -392,7 +392,7 @@ |
1645 | header = 'Digest realm="%s", ' % tcs.auth_realm |
1646 | header += 'nonce="%s", algorithm="%s", qop="auth"' % (tcs.auth_nonce, |
1647 | 'MD5') |
1648 | - self.send_header(tcs.auth_header_sent,header) |
1649 | + self.send_header(tcs.auth_header_sent, header) |
1650 | |
1651 | |
1652 | class AuthServer(http_server.HttpServer): |
1653 | |
1654 | === modified file 'breezy/tests/per_branch/__init__.py' |
1655 | --- breezy/tests/per_branch/__init__.py 2017-08-10 02:02:57 +0000 |
1656 | +++ breezy/tests/per_branch/__init__.py 2017-11-12 14:04:35 +0000 |
1657 | @@ -49,10 +49,10 @@ |
1658 | branch_format.__class__.__name__) |
1659 | scenario_name += name_suffix |
1660 | scenario = (scenario_name, { |
1661 | - "transport_server":transport_server, |
1662 | - "transport_readonly_server":transport_readonly_server, |
1663 | - "bzrdir_format":bzrdir_format, |
1664 | - "branch_format":branch_format, |
1665 | + "transport_server": transport_server, |
1666 | + "transport_readonly_server": transport_readonly_server, |
1667 | + "bzrdir_format": bzrdir_format, |
1668 | + "branch_format": branch_format, |
1669 | }) |
1670 | result.append(scenario) |
1671 | return result |
1672 | |
1673 | === modified file 'breezy/tests/per_intertree/__init__.py' |
1674 | --- breezy/tests/per_intertree/__init__.py 2017-08-05 01:03:53 +0000 |
1675 | +++ breezy/tests/per_intertree/__init__.py 2017-11-12 14:04:35 +0000 |
1676 | @@ -95,13 +95,13 @@ |
1677 | scenario = (label, { |
1678 | "transport_server": transport_server, |
1679 | "transport_readonly_server": transport_readonly_server, |
1680 | - "bzrdir_format":workingtree_format._matchingcontroldir, |
1681 | - "workingtree_format":workingtree_format, |
1682 | - "intertree_class":intertree_class, |
1683 | - "workingtree_format_to":workingtree_format_to, |
1684 | + "bzrdir_format": workingtree_format._matchingcontroldir, |
1685 | + "workingtree_format": workingtree_format, |
1686 | + "intertree_class": intertree_class, |
1687 | + "workingtree_format_to": workingtree_format_to, |
1688 | # mutable_trees_to_test_trees takes two trees and converts them to, |
1689 | # whatever relationship the optimiser under test requires., |
1690 | - "mutable_trees_to_test_trees":mutable_trees_to_test_trees, |
1691 | + "mutable_trees_to_test_trees": mutable_trees_to_test_trees, |
1692 | # workingtree_to_test_tree is set to disable changing individual, |
1693 | # trees: instead the mutable_trees_to_test_trees helper is used., |
1694 | "_workingtree_to_test_tree": return_parameter, |
1695 | |
1696 | === modified file 'breezy/tests/per_inventory/basics.py' |
1697 | --- breezy/tests/per_inventory/basics.py 2017-06-08 23:30:31 +0000 |
1698 | +++ breezy/tests/per_inventory/basics.py 2017-11-12 14:04:35 +0000 |
1699 | @@ -154,8 +154,8 @@ |
1700 | def test_non_directory_children(self): |
1701 | """Test path2id when a parent directory has no children""" |
1702 | inv = inventory.Inventory('tree-root') |
1703 | - inv.add(self.make_file('file-id','file', 'tree-root')) |
1704 | - inv.add(self.make_link('link-id','link', 'tree-root')) |
1705 | + inv.add(self.make_file('file-id', 'file', 'tree-root')) |
1706 | + inv.add(self.make_link('link-id', 'link', 'tree-root')) |
1707 | self.assertIs(None, inv.path2id('file/subfile')) |
1708 | self.assertIs(None, inv.path2id('link/subfile')) |
1709 | |
1710 | |
1711 | === modified file 'breezy/tests/per_repository/__init__.py' |
1712 | --- breezy/tests/per_repository/__init__.py 2017-08-05 01:03:53 +0000 |
1713 | +++ breezy/tests/per_repository/__init__.py 2017-11-12 14:04:35 +0000 |
1714 | @@ -52,10 +52,10 @@ |
1715 | scenario_name = repository_format.__class__.__name__ |
1716 | scenario_name += scenario_name_suffix |
1717 | scenario = (scenario_name, |
1718 | - {"transport_server":transport_server, |
1719 | - "transport_readonly_server":transport_readonly_server, |
1720 | - "bzrdir_format":repository_format._matchingcontroldir, |
1721 | - "repository_format":repository_format, |
1722 | + {"transport_server": transport_server, |
1723 | + "transport_readonly_server": transport_readonly_server, |
1724 | + "bzrdir_format": repository_format._matchingcontroldir, |
1725 | + "repository_format": repository_format, |
1726 | }) |
1727 | # Only override the test's vfs_transport_factory if one was |
1728 | # specified, otherwise just leave the default in place. |
1729 | |
1730 | === modified file 'breezy/tests/per_repository/test_get_parent_map.py' |
1731 | --- breezy/tests/per_repository/test_get_parent_map.py 2017-05-21 18:10:28 +0000 |
1732 | +++ breezy/tests/per_repository/test_get_parent_map.py 2017-11-12 14:04:35 +0000 |
1733 | @@ -41,9 +41,9 @@ |
1734 | self.addCleanup(repo.unlock) |
1735 | self.assertEqual({rev3:(rev1, rev2)}, |
1736 | repo.get_parent_map([rev3])) |
1737 | - self.assertEqual({rev1:(revision.NULL_REVISION,), |
1738 | - rev2:(rev1,), |
1739 | - rev3:(rev1, rev2), |
1740 | + self.assertEqual({rev1: (revision.NULL_REVISION,), |
1741 | + rev2: (rev1,), |
1742 | + rev3: (rev1, rev2), |
1743 | }, repo.get_parent_map([rev1, rev2, rev3])) |
1744 | |
1745 | def test_no_parents(self): |
1746 | |
1747 | === modified file 'breezy/tests/per_repository_vf/test_fileid_involved.py' |
1748 | --- breezy/tests/per_repository_vf/test_fileid_involved.py 2017-06-11 14:07:05 +0000 |
1749 | +++ breezy/tests/per_repository_vf/test_fileid_involved.py 2017-11-12 14:04:35 +0000 |
1750 | @@ -165,7 +165,7 @@ |
1751 | |
1752 | main_wt = self.make_branch_and_tree('main') |
1753 | main_branch = main_wt.branch |
1754 | - self.build_tree(["main/a","main/b","main/c"]) |
1755 | + self.build_tree(["main/a", "main/b", "main/c"]) |
1756 | |
1757 | main_wt.add(['a', 'b', 'c'], ['a-file-id-2006-01-01-abcd', |
1758 | 'b-file-id-2006-01-01-defg', |
1759 | @@ -211,7 +211,7 @@ |
1760 | |
1761 | #-------- end C ----------- |
1762 | |
1763 | - bt1.rename_one("d","e") |
1764 | + bt1.rename_one("d", "e") |
1765 | bt1.commit("branch1, commit two", rev_id="rev-F") |
1766 | |
1767 | #-------- end F ----------- |
1768 | @@ -237,12 +237,12 @@ |
1769 | def test_fileids_altered_between_two_revs(self): |
1770 | self.branch.lock_read() |
1771 | self.addCleanup(self.branch.unlock) |
1772 | - self.branch.repository.fileids_altered_by_revision_ids(["rev-J","rev-K"]) |
1773 | + self.branch.repository.fileids_altered_by_revision_ids(["rev-J", "rev-K"]) |
1774 | self.assertEqual( |
1775 | {'b-file-id-2006-01-01-defg':{'rev-J'}, |
1776 | 'c-funky<file-id>quiji%bo':{'rev-K'} |
1777 | }, |
1778 | - self.branch.repository.fileids_altered_by_revision_ids(["rev-J","rev-K"])) |
1779 | + self.branch.repository.fileids_altered_by_revision_ids(["rev-J", "rev-K"])) |
1780 | |
1781 | self.assertEqual( |
1782 | {'b-file-id-2006-01-01-defg': {'rev-<D>'}, |
1783 | @@ -281,7 +281,7 @@ |
1784 | self.branch.lock_read() |
1785 | self.addCleanup(self.branch.unlock) |
1786 | self.assertEqual( |
1787 | - {'a-file-id-2006-01-01-abcd':{'rev-A'}, |
1788 | + {'a-file-id-2006-01-01-abcd': {'rev-A'}, |
1789 | 'b-file-id-2006-01-01-defg': {'rev-A'}, |
1790 | 'c-funky<file-id>quiji%bo': {'rev-A'}, |
1791 | }, |
1792 | @@ -312,9 +312,9 @@ |
1793 | if len(history) < 2: |
1794 | return |
1795 | |
1796 | - for start in range(0,len(history)-1): |
1797 | + for start in range(0, len(history)-1): |
1798 | start_id = history[start] |
1799 | - for end in range(start+1,len(history)): |
1800 | + for end in range(start+1, len(history)): |
1801 | end_id = history[end] |
1802 | unique_revs = graph.find_unique_ancestors(end_id, [start_id]) |
1803 | l1 = self.branch.repository.fileids_altered_by_revision_ids( |
1804 | @@ -365,7 +365,7 @@ |
1805 | self.branch = None |
1806 | main_wt = self.make_branch_and_tree('main') |
1807 | main_branch = main_wt.branch |
1808 | - self.build_tree(["main/a","main/b","main/c"]) |
1809 | + self.build_tree(["main/a", "main/b", "main/c"]) |
1810 | |
1811 | main_wt.add(['a', 'b', 'c'], ['a-file-id-2006-01-01-abcd', |
1812 | 'b-file-id-2006-01-01-defg', |
1813 | |
1814 | === modified file 'breezy/tests/per_transport.py' |
1815 | --- breezy/tests/per_transport.py 2017-07-15 13:23:08 +0000 |
1816 | +++ breezy/tests/per_transport.py 2017-11-12 14:04:35 +0000 |
1817 | @@ -1693,7 +1693,7 @@ |
1818 | self.assertTrue(data_len >= 100) |
1819 | check_result_data(result) |
1820 | # close ranges get combined (even if out of order) |
1821 | - for request_vector in [((400,50), (800, 234)), ((800, 234), (400,50))]: |
1822 | + for request_vector in [((400, 50), (800, 234)), ((800, 234), (400, 50))]: |
1823 | result = list(transport.readv('a', request_vector, |
1824 | adjust_for_latency=True, upper_limit=content_size)) |
1825 | self.assertEqual(1, len(result)) |
1826 | @@ -1731,7 +1731,7 @@ |
1827 | handle = t.open_write_stream('foo') |
1828 | try: |
1829 | handle.write('bcd') |
1830 | - self.assertEqual([(0, 'b'), (2, 'd')], list(t.readv('foo', ((0,1), (2,1))))) |
1831 | + self.assertEqual([(0, 'b'), (2, 'd')], list(t.readv('foo', ((0, 1), (2, 1))))) |
1832 | finally: |
1833 | handle.close() |
1834 | |
1835 | @@ -1758,12 +1758,12 @@ |
1836 | self.assertListRaises((errors.ShortReadvError, errors.InvalidRange, |
1837 | # Can be raised by paramiko |
1838 | AssertionError), |
1839 | - transport.readv, 'a', [(1,1), (8,10)]) |
1840 | + transport.readv, 'a', [(1, 1), (8, 10)]) |
1841 | |
1842 | # This is trying to seek past the end of the file, it should |
1843 | # also raise a special error |
1844 | self.assertListRaises((errors.ShortReadvError, errors.InvalidRange), |
1845 | - transport.readv, 'a', [(12,2)]) |
1846 | + transport.readv, 'a', [(12, 2)]) |
1847 | |
1848 | def test_no_segment_parameters(self): |
1849 | """Segment parameters should be stripped and stored in |
1850 | |
1851 | === modified file 'breezy/tests/per_versionedfile.py' |
1852 | --- breezy/tests/per_versionedfile.py 2017-07-12 00:35:04 +0000 |
1853 | +++ breezy/tests/per_versionedfile.py 2017-11-12 14:04:35 +0000 |
1854 | @@ -482,32 +482,32 @@ |
1855 | next_parent = 'base' |
1856 | text_name = 'chain1-' |
1857 | text = ['line\n'] |
1858 | - sha1s = {0 :'da6d3141cb4a5e6f464bf6e0518042ddc7bfd079', |
1859 | - 1 :'45e21ea146a81ea44a821737acdb4f9791c8abe7', |
1860 | - 2 :'e1f11570edf3e2a070052366c582837a4fe4e9fa', |
1861 | - 3 :'26b4b8626da827088c514b8f9bbe4ebf181edda1', |
1862 | - 4 :'e28a5510be25ba84d31121cff00956f9970ae6f6', |
1863 | - 5 :'d63ec0ce22e11dcf65a931b69255d3ac747a318d', |
1864 | - 6 :'2c2888d288cb5e1d98009d822fedfe6019c6a4ea', |
1865 | - 7 :'95c14da9cafbf828e3e74a6f016d87926ba234ab', |
1866 | - 8 :'779e9a0b28f9f832528d4b21e17e168c67697272', |
1867 | - 9 :'1f8ff4e5c6ff78ac106fcfe6b1e8cb8740ff9a8f', |
1868 | - 10:'131a2ae712cf51ed62f143e3fbac3d4206c25a05', |
1869 | - 11:'c5a9d6f520d2515e1ec401a8f8a67e6c3c89f199', |
1870 | - 12:'31a2286267f24d8bedaa43355f8ad7129509ea85', |
1871 | - 13:'dc2a7fe80e8ec5cae920973973a8ee28b2da5e0a', |
1872 | - 14:'2c4b1736566b8ca6051e668de68650686a3922f2', |
1873 | - 15:'5912e4ecd9b0c07be4d013e7e2bdcf9323276cde', |
1874 | - 16:'b0d2e18d3559a00580f6b49804c23fea500feab3', |
1875 | - 17:'8e1d43ad72f7562d7cb8f57ee584e20eb1a69fc7', |
1876 | - 18:'5cf64a3459ae28efa60239e44b20312d25b253f3', |
1877 | - 19:'1ebed371807ba5935958ad0884595126e8c4e823', |
1878 | - 20:'2aa62a8b06fb3b3b892a3292a068ade69d5ee0d3', |
1879 | - 21:'01edc447978004f6e4e962b417a4ae1955b6fe5d', |
1880 | - 22:'d8d8dc49c4bf0bab401e0298bb5ad827768618bb', |
1881 | - 23:'c21f62b1c482862983a8ffb2b0c64b3451876e3f', |
1882 | - 24:'c0593fe795e00dff6b3c0fe857a074364d5f04fc', |
1883 | - 25:'dd1a1cf2ba9cc225c3aff729953e6364bf1d1855', |
1884 | + sha1s = {0: 'da6d3141cb4a5e6f464bf6e0518042ddc7bfd079', |
1885 | + 1: '45e21ea146a81ea44a821737acdb4f9791c8abe7', |
1886 | + 2: 'e1f11570edf3e2a070052366c582837a4fe4e9fa', |
1887 | + 3: '26b4b8626da827088c514b8f9bbe4ebf181edda1', |
1888 | + 4: 'e28a5510be25ba84d31121cff00956f9970ae6f6', |
1889 | + 5: 'd63ec0ce22e11dcf65a931b69255d3ac747a318d', |
1890 | + 6: '2c2888d288cb5e1d98009d822fedfe6019c6a4ea', |
1891 | + 7: '95c14da9cafbf828e3e74a6f016d87926ba234ab', |
1892 | + 8: '779e9a0b28f9f832528d4b21e17e168c67697272', |
1893 | + 9: '1f8ff4e5c6ff78ac106fcfe6b1e8cb8740ff9a8f', |
1894 | + 10: '131a2ae712cf51ed62f143e3fbac3d4206c25a05', |
1895 | + 11: 'c5a9d6f520d2515e1ec401a8f8a67e6c3c89f199', |
1896 | + 12: '31a2286267f24d8bedaa43355f8ad7129509ea85', |
1897 | + 13: 'dc2a7fe80e8ec5cae920973973a8ee28b2da5e0a', |
1898 | + 14: '2c4b1736566b8ca6051e668de68650686a3922f2', |
1899 | + 15: '5912e4ecd9b0c07be4d013e7e2bdcf9323276cde', |
1900 | + 16: 'b0d2e18d3559a00580f6b49804c23fea500feab3', |
1901 | + 17: '8e1d43ad72f7562d7cb8f57ee584e20eb1a69fc7', |
1902 | + 18: '5cf64a3459ae28efa60239e44b20312d25b253f3', |
1903 | + 19: '1ebed371807ba5935958ad0884595126e8c4e823', |
1904 | + 20: '2aa62a8b06fb3b3b892a3292a068ade69d5ee0d3', |
1905 | + 21: '01edc447978004f6e4e962b417a4ae1955b6fe5d', |
1906 | + 22: 'd8d8dc49c4bf0bab401e0298bb5ad827768618bb', |
1907 | + 23: 'c21f62b1c482862983a8ffb2b0c64b3451876e3f', |
1908 | + 24: 'c0593fe795e00dff6b3c0fe857a074364d5f04fc', |
1909 | + 25: 'dd1a1cf2ba9cc225c3aff729953e6364bf1d1855', |
1910 | } |
1911 | for depth in range(26): |
1912 | new_version = text_name + '%s' % depth |
1913 | @@ -880,14 +880,14 @@ |
1914 | self.plan_merge_vf.get_parent_map([('root', 'B')])) |
1915 | self.assertEqual({('root', 'D'):(('root', 'C'),)}, |
1916 | self.plan_merge_vf.get_parent_map([('root', 'D')])) |
1917 | - self.assertEqual({('root', 'E:'):(('root', 'B'),('root', 'D'))}, |
1918 | + self.assertEqual({('root', 'E:'):(('root', 'B'), ('root', 'D'))}, |
1919 | self.plan_merge_vf.get_parent_map([('root', 'E:')])) |
1920 | self.assertEqual({}, |
1921 | self.plan_merge_vf.get_parent_map([('root', 'F')])) |
1922 | self.assertEqual({ |
1923 | - ('root', 'B'):(('root', 'A'),), |
1924 | - ('root', 'D'):(('root', 'C'),), |
1925 | - ('root', 'E:'):(('root', 'B'),('root', 'D')), |
1926 | + ('root', 'B'): (('root', 'A'),), |
1927 | + ('root', 'D'): (('root', 'C'),), |
1928 | + ('root', 'E:'): (('root', 'B'), ('root', 'D')), |
1929 | }, |
1930 | self.plan_merge_vf.get_parent_map( |
1931 | [('root', 'B'), ('root', 'D'), ('root', 'E:'), ('root', 'F')])) |
1932 | @@ -1396,78 +1396,78 @@ |
1933 | # plain text knits in packs (texts) |
1934 | len_one_scenarios = [ |
1935 | ('weave-named', { |
1936 | - 'cleanup':None, |
1937 | - 'factory':make_versioned_files_factory(WeaveFile, |
1938 | + 'cleanup': None, |
1939 | + 'factory': make_versioned_files_factory(WeaveFile, |
1940 | ConstantMapper('inventory')), |
1941 | - 'graph':True, |
1942 | - 'key_length':1, |
1943 | + 'graph': True, |
1944 | + 'key_length': 1, |
1945 | 'support_partial_insertion': False, |
1946 | }), |
1947 | ('named-knit', { |
1948 | - 'cleanup':None, |
1949 | - 'factory':make_file_factory(False, ConstantMapper('revisions')), |
1950 | - 'graph':True, |
1951 | - 'key_length':1, |
1952 | + 'cleanup': None, |
1953 | + 'factory': make_file_factory(False, ConstantMapper('revisions')), |
1954 | + 'graph': True, |
1955 | + 'key_length': 1, |
1956 | 'support_partial_insertion': False, |
1957 | }), |
1958 | ('named-nograph-nodelta-knit-pack', { |
1959 | - 'cleanup':cleanup_pack_knit, |
1960 | - 'factory':make_pack_factory(False, False, 1), |
1961 | - 'graph':False, |
1962 | - 'key_length':1, |
1963 | + 'cleanup': cleanup_pack_knit, |
1964 | + 'factory': make_pack_factory(False, False, 1), |
1965 | + 'graph': False, |
1966 | + 'key_length': 1, |
1967 | 'support_partial_insertion': False, |
1968 | }), |
1969 | ('named-graph-knit-pack', { |
1970 | - 'cleanup':cleanup_pack_knit, |
1971 | - 'factory':make_pack_factory(True, True, 1), |
1972 | - 'graph':True, |
1973 | - 'key_length':1, |
1974 | + 'cleanup': cleanup_pack_knit, |
1975 | + 'factory': make_pack_factory(True, True, 1), |
1976 | + 'graph': True, |
1977 | + 'key_length': 1, |
1978 | 'support_partial_insertion': True, |
1979 | }), |
1980 | ('named-graph-nodelta-knit-pack', { |
1981 | - 'cleanup':cleanup_pack_knit, |
1982 | - 'factory':make_pack_factory(True, False, 1), |
1983 | - 'graph':True, |
1984 | - 'key_length':1, |
1985 | + 'cleanup': cleanup_pack_knit, |
1986 | + 'factory': make_pack_factory(True, False, 1), |
1987 | + 'graph': True, |
1988 | + 'key_length': 1, |
1989 | 'support_partial_insertion': False, |
1990 | }), |
1991 | ('groupcompress-nograph', { |
1992 | - 'cleanup':groupcompress.cleanup_pack_group, |
1993 | - 'factory':groupcompress.make_pack_factory(False, False, 1), |
1994 | + 'cleanup': groupcompress.cleanup_pack_group, |
1995 | + 'factory': groupcompress.make_pack_factory(False, False, 1), |
1996 | 'graph': False, |
1997 | - 'key_length':1, |
1998 | - 'support_partial_insertion':False, |
1999 | + 'key_length': 1, |
2000 | + 'support_partial_insertion': False, |
2001 | }), |
2002 | ] |
2003 | len_two_scenarios = [ |
2004 | ('weave-prefix', { |
2005 | - 'cleanup':None, |
2006 | - 'factory':make_versioned_files_factory(WeaveFile, |
2007 | + 'cleanup': None, |
2008 | + 'factory': make_versioned_files_factory(WeaveFile, |
2009 | PrefixMapper()), |
2010 | - 'graph':True, |
2011 | - 'key_length':2, |
2012 | + 'graph': True, |
2013 | + 'key_length': 2, |
2014 | 'support_partial_insertion': False, |
2015 | }), |
2016 | ('annotated-knit-escape', { |
2017 | - 'cleanup':None, |
2018 | - 'factory':make_file_factory(True, HashEscapedPrefixMapper()), |
2019 | - 'graph':True, |
2020 | - 'key_length':2, |
2021 | + 'cleanup': None, |
2022 | + 'factory': make_file_factory(True, HashEscapedPrefixMapper()), |
2023 | + 'graph': True, |
2024 | + 'key_length': 2, |
2025 | 'support_partial_insertion': False, |
2026 | }), |
2027 | ('plain-knit-pack', { |
2028 | - 'cleanup':cleanup_pack_knit, |
2029 | - 'factory':make_pack_factory(True, True, 2), |
2030 | - 'graph':True, |
2031 | - 'key_length':2, |
2032 | + 'cleanup': cleanup_pack_knit, |
2033 | + 'factory': make_pack_factory(True, True, 2), |
2034 | + 'graph': True, |
2035 | + 'key_length': 2, |
2036 | 'support_partial_insertion': True, |
2037 | }), |
2038 | ('groupcompress', { |
2039 | - 'cleanup':groupcompress.cleanup_pack_group, |
2040 | - 'factory':groupcompress.make_pack_factory(True, False, 1), |
2041 | + 'cleanup': groupcompress.cleanup_pack_group, |
2042 | + 'factory': groupcompress.make_pack_factory(True, False, 1), |
2043 | 'graph': True, |
2044 | - 'key_length':1, |
2045 | - 'support_partial_insertion':False, |
2046 | + 'key_length': 1, |
2047 | + 'support_partial_insertion': False, |
2048 | }), |
2049 | ] |
2050 | |
2051 | @@ -1860,10 +1860,10 @@ |
2052 | ('FileB', 'base'), |
2053 | ] |
2054 | sort_order = { |
2055 | - ('FileA', 'merged'):2, ('FileA', 'left'):1, ('FileA', 'right'):1, |
2056 | - ('FileA', 'base'):0, |
2057 | - ('FileB', 'merged'):2, ('FileB', 'left'):1, ('FileB', 'right'):1, |
2058 | - ('FileB', 'base'):0, |
2059 | + ('FileA', 'merged'): 2, ('FileA', 'left'): 1, ('FileA', 'right'): 1, |
2060 | + ('FileA', 'base'): 0, |
2061 | + ('FileB', 'merged'): 2, ('FileB', 'left'): 1, ('FileB', 'right'): 1, |
2062 | + ('FileB', 'base'): 0, |
2063 | } |
2064 | return keys, sort_order |
2065 | |
2066 | @@ -1880,10 +1880,10 @@ |
2067 | ('FileB', 'base'), |
2068 | ] |
2069 | sort_order = { |
2070 | - ('FileA', 'merged'):0, ('FileA', 'left'):1, ('FileA', 'right'):1, |
2071 | - ('FileA', 'base'):2, |
2072 | - ('FileB', 'merged'):3, ('FileB', 'left'):4, ('FileB', 'right'):4, |
2073 | - ('FileB', 'base'):5, |
2074 | + ('FileA', 'merged'): 0, ('FileA', 'left'): 1, ('FileA', 'right'): 1, |
2075 | + ('FileA', 'base'): 2, |
2076 | + ('FileB', 'merged'): 3, ('FileB', 'left'): 4, ('FileB', 'right'): 4, |
2077 | + ('FileB', 'base'): 5, |
2078 | } |
2079 | return keys, sort_order |
2080 | |
2081 | @@ -2259,7 +2259,7 @@ |
2082 | (('r1',), self.get_parents((('r0',),))), |
2083 | (('r2',), self.get_parents(())), |
2084 | (('r3',), self.get_parents(())), |
2085 | - (('m',), self.get_parents((('r0',),('r1',),('r2',),('r3',)))), |
2086 | + (('m',), self.get_parents((('r0',), ('r1',), ('r2',), ('r3',)))), |
2087 | ] |
2088 | else: |
2089 | parent_details = [ |
2090 | @@ -2676,32 +2676,32 @@ |
2091 | next_parent = self.get_simple_key('base') |
2092 | text_name = 'chain1-' |
2093 | text = ['line\n'] |
2094 | - sha1s = {0 :'da6d3141cb4a5e6f464bf6e0518042ddc7bfd079', |
2095 | - 1 :'45e21ea146a81ea44a821737acdb4f9791c8abe7', |
2096 | - 2 :'e1f11570edf3e2a070052366c582837a4fe4e9fa', |
2097 | - 3 :'26b4b8626da827088c514b8f9bbe4ebf181edda1', |
2098 | - 4 :'e28a5510be25ba84d31121cff00956f9970ae6f6', |
2099 | - 5 :'d63ec0ce22e11dcf65a931b69255d3ac747a318d', |
2100 | - 6 :'2c2888d288cb5e1d98009d822fedfe6019c6a4ea', |
2101 | - 7 :'95c14da9cafbf828e3e74a6f016d87926ba234ab', |
2102 | - 8 :'779e9a0b28f9f832528d4b21e17e168c67697272', |
2103 | - 9 :'1f8ff4e5c6ff78ac106fcfe6b1e8cb8740ff9a8f', |
2104 | - 10:'131a2ae712cf51ed62f143e3fbac3d4206c25a05', |
2105 | - 11:'c5a9d6f520d2515e1ec401a8f8a67e6c3c89f199', |
2106 | - 12:'31a2286267f24d8bedaa43355f8ad7129509ea85', |
2107 | - 13:'dc2a7fe80e8ec5cae920973973a8ee28b2da5e0a', |
2108 | - 14:'2c4b1736566b8ca6051e668de68650686a3922f2', |
2109 | - 15:'5912e4ecd9b0c07be4d013e7e2bdcf9323276cde', |
2110 | - 16:'b0d2e18d3559a00580f6b49804c23fea500feab3', |
2111 | - 17:'8e1d43ad72f7562d7cb8f57ee584e20eb1a69fc7', |
2112 | - 18:'5cf64a3459ae28efa60239e44b20312d25b253f3', |
2113 | - 19:'1ebed371807ba5935958ad0884595126e8c4e823', |
2114 | - 20:'2aa62a8b06fb3b3b892a3292a068ade69d5ee0d3', |
2115 | - 21:'01edc447978004f6e4e962b417a4ae1955b6fe5d', |
2116 | - 22:'d8d8dc49c4bf0bab401e0298bb5ad827768618bb', |
2117 | - 23:'c21f62b1c482862983a8ffb2b0c64b3451876e3f', |
2118 | - 24:'c0593fe795e00dff6b3c0fe857a074364d5f04fc', |
2119 | - 25:'dd1a1cf2ba9cc225c3aff729953e6364bf1d1855', |
2120 | + sha1s = {0: 'da6d3141cb4a5e6f464bf6e0518042ddc7bfd079', |
2121 | + 1: '45e21ea146a81ea44a821737acdb4f9791c8abe7', |
2122 | + 2: 'e1f11570edf3e2a070052366c582837a4fe4e9fa', |
2123 | + 3: '26b4b8626da827088c514b8f9bbe4ebf181edda1', |
2124 | + 4: 'e28a5510be25ba84d31121cff00956f9970ae6f6', |
2125 | + 5: 'd63ec0ce22e11dcf65a931b69255d3ac747a318d', |
2126 | + 6: '2c2888d288cb5e1d98009d822fedfe6019c6a4ea', |
2127 | + 7: '95c14da9cafbf828e3e74a6f016d87926ba234ab', |
2128 | + 8: '779e9a0b28f9f832528d4b21e17e168c67697272', |
2129 | + 9: '1f8ff4e5c6ff78ac106fcfe6b1e8cb8740ff9a8f', |
2130 | + 10: '131a2ae712cf51ed62f143e3fbac3d4206c25a05', |
2131 | + 11: 'c5a9d6f520d2515e1ec401a8f8a67e6c3c89f199', |
2132 | + 12: '31a2286267f24d8bedaa43355f8ad7129509ea85', |
2133 | + 13: 'dc2a7fe80e8ec5cae920973973a8ee28b2da5e0a', |
2134 | + 14: '2c4b1736566b8ca6051e668de68650686a3922f2', |
2135 | + 15: '5912e4ecd9b0c07be4d013e7e2bdcf9323276cde', |
2136 | + 16: 'b0d2e18d3559a00580f6b49804c23fea500feab3', |
2137 | + 17: '8e1d43ad72f7562d7cb8f57ee584e20eb1a69fc7', |
2138 | + 18: '5cf64a3459ae28efa60239e44b20312d25b253f3', |
2139 | + 19: '1ebed371807ba5935958ad0884595126e8c4e823', |
2140 | + 20: '2aa62a8b06fb3b3b892a3292a068ade69d5ee0d3', |
2141 | + 21: '01edc447978004f6e4e962b417a4ae1955b6fe5d', |
2142 | + 22: 'd8d8dc49c4bf0bab401e0298bb5ad827768618bb', |
2143 | + 23: 'c21f62b1c482862983a8ffb2b0c64b3451876e3f', |
2144 | + 24: 'c0593fe795e00dff6b3c0fe857a074364d5f04fc', |
2145 | + 25: 'dd1a1cf2ba9cc225c3aff729953e6364bf1d1855', |
2146 | } |
2147 | for depth in range(26): |
2148 | new_version = self.get_simple_key(text_name + '%s' % depth) |
2149 | @@ -2784,7 +2784,7 @@ |
2150 | |
2151 | def test_get_parent_map(self): |
2152 | self._parent_map = {"G": ("A", "B")} |
2153 | - self.assertEqual({("G",): (("A",),("B",))}, |
2154 | + self.assertEqual({("G",): (("A",), ("B",))}, |
2155 | self.texts.get_parent_map([("G",), ("L",)])) |
2156 | |
2157 | def test_get_record_stream(self): |
2158 | |
2159 | === modified file 'breezy/tests/per_workingtree/test_remove.py' |
2160 | --- breezy/tests/per_workingtree/test_remove.py 2017-06-10 00:17:06 +0000 |
2161 | +++ breezy/tests/per_workingtree/test_remove.py 2017-11-12 14:04:35 +0000 |
2162 | @@ -108,7 +108,7 @@ |
2163 | tree = self.get_committed_tree(TestRemove.files) |
2164 | |
2165 | for f in TestRemove.rfiles: |
2166 | - tree.rename_one(f,f+'x') |
2167 | + tree.rename_one(f, f+'x') |
2168 | rfilesx = ['bx/cx', 'bx', 'ax', 'dx'] |
2169 | self.assertInWorkingTree(rfilesx) |
2170 | self.assertPathExists(rfilesx) |
2171 | @@ -122,10 +122,10 @@ |
2172 | tree = self.get_committed_tree(TestRemove.files) |
2173 | |
2174 | for f in TestRemove.rfiles: |
2175 | - tree.rename_one(f,f+'x') |
2176 | + tree.rename_one(f, f+'x') |
2177 | rfilesx = ['bx/cx', 'bx', 'ax', 'dx'] |
2178 | - self.build_tree_contents([('ax','changed and renamed!'), |
2179 | - ('bx/cx','changed and renamed!')]) |
2180 | + self.build_tree_contents([('ax', 'changed and renamed!'), |
2181 | + ('bx/cx', 'changed and renamed!')]) |
2182 | self.assertInWorkingTree(rfilesx) |
2183 | self.assertPathExists(rfilesx) |
2184 | |
2185 | |
2186 | === modified file 'breezy/tests/per_workingtree/test_smart_add.py' |
2187 | --- breezy/tests/per_workingtree/test_smart_add.py 2017-06-10 00:17:06 +0000 |
2188 | +++ breezy/tests/per_workingtree/test_smart_add.py 2017-11-12 14:04:35 +0000 |
2189 | @@ -340,7 +340,7 @@ |
2190 | self.wt.lock_read() |
2191 | self.addCleanup(self.wt.unlock) |
2192 | self.assertEqual([('', 'directory'), (u'\xe5', 'file')], |
2193 | - [(path, ie.kind) for path,ie in |
2194 | + [(path, ie.kind) for path, ie in |
2195 | self.wt.iter_entries_by_dir()]) |
2196 | |
2197 | def test_accessible_implicit(self): |
2198 | @@ -353,7 +353,7 @@ |
2199 | self.wt.lock_read() |
2200 | self.addCleanup(self.wt.unlock) |
2201 | self.assertEqual([('', 'directory'), (u'\xe5', 'file')], |
2202 | - [(path, ie.kind) for path,ie |
2203 | + [(path, ie.kind) for path, ie |
2204 | in self.wt.iter_entries_by_dir()]) |
2205 | |
2206 | def test_inaccessible_explicit(self): |
2207 | |
2208 | === modified file 'breezy/tests/per_workingtree/test_walkdirs.py' |
2209 | --- breezy/tests/per_workingtree/test_walkdirs.py 2017-06-10 00:17:06 +0000 |
2210 | +++ breezy/tests/per_workingtree/test_walkdirs.py 2017-11-12 14:04:35 +0000 |
2211 | @@ -84,7 +84,7 @@ |
2212 | def add_dirblock(path, kind): |
2213 | dirblock = DirBlock(tree, path) |
2214 | if file_status != self.unknown: |
2215 | - dirblock.id = 'a ' + str(path).replace('/','-') + '-id' |
2216 | + dirblock.id = 'a ' + str(path).replace('/', '-') + '-id' |
2217 | dirblock.inventory_kind = kind |
2218 | if file_status != self.missing: |
2219 | dirblock.disk_kind = kind |
2220 | |
2221 | === modified file 'breezy/tests/per_workingtree/test_workingtree.py' |
2222 | --- breezy/tests/per_workingtree/test_workingtree.py 2017-10-07 22:42:22 +0000 |
2223 | +++ breezy/tests/per_workingtree/test_workingtree.py 2017-11-12 14:04:35 +0000 |
2224 | @@ -819,7 +819,7 @@ |
2225 | tree.add([u'a\u030a']) |
2226 | tree.lock_read() |
2227 | self.assertEqual([('', 'directory'), (u'\xe5', 'file')], |
2228 | - [(path, ie.kind) for path,ie in |
2229 | + [(path, ie.kind) for path, ie in |
2230 | tree.iter_entries_by_dir()]) |
2231 | tree.unlock() |
2232 | finally: |
2233 | |
2234 | === modified file 'breezy/tests/test__known_graph.py' |
2235 | --- breezy/tests/test__known_graph.py 2017-05-22 00:56:52 +0000 |
2236 | +++ breezy/tests/test__known_graph.py 2017-11-12 14:04:35 +0000 |
2237 | @@ -462,7 +462,7 @@ |
2238 | 'C': ['A', 'B']}, |
2239 | 'C', |
2240 | [('C', 0, (2,), False), |
2241 | - ('B', 1, (1,1,1), True), |
2242 | + ('B', 1, (1, 1, 1), True), |
2243 | ('A', 0, (1,), True), |
2244 | ], |
2245 | ) |
2246 | @@ -485,8 +485,8 @@ |
2247 | } |
2248 | self.assertSortAndIterate(graph, 'F', |
2249 | [('F', 0, (3,), False), |
2250 | - ('D', 1, (2,2,1), False), |
2251 | - ('C', 2, (2,1,1), True), |
2252 | + ('D', 1, (2, 2, 1), False), |
2253 | + ('C', 2, (2, 1, 1), True), |
2254 | ('B', 0, (2,), False), |
2255 | ('A', 0, (1,), True), |
2256 | ]) |
2257 | @@ -508,9 +508,9 @@ |
2258 | } |
2259 | self.assertSortAndIterate(graph, 'F', |
2260 | [('F', 0, (3,), False), |
2261 | - ('D', 1, (2,1,2), False), |
2262 | - ('C', 2, (2,2,1), True), |
2263 | - ('X', 1, (2,1,1), True), |
2264 | + ('D', 1, (2, 1, 2), False), |
2265 | + ('C', 2, (2, 2, 1), True), |
2266 | + ('X', 1, (2, 1, 1), True), |
2267 | ('B', 0, (2,), False), |
2268 | ('A', 0, (1,), True), |
2269 | ]) |
2270 | @@ -539,12 +539,12 @@ |
2271 | }, |
2272 | 'A', |
2273 | [('A', 0, (3,), False), |
2274 | - ('B', 1, (1,3,2), False), |
2275 | - ('C', 1, (1,3,1), True), |
2276 | + ('B', 1, (1, 3, 2), False), |
2277 | + ('C', 1, (1, 3, 1), True), |
2278 | ('D', 0, (2,), False), |
2279 | - ('E', 1, (1,1,2), False), |
2280 | - ('F', 2, (1,2,1), True), |
2281 | - ('G', 1, (1,1,1), True), |
2282 | + ('E', 1, (1, 1, 2), False), |
2283 | + ('F', 2, (1, 2, 1), True), |
2284 | + ('G', 1, (1, 1, 1), True), |
2285 | ('H', 0, (1,), True), |
2286 | ], |
2287 | ) |
2288 | @@ -577,14 +577,14 @@ |
2289 | }, |
2290 | 'L', |
2291 | [('L', 0, (6,), False), |
2292 | - ('K', 1, (1,3,2), False), |
2293 | - ('I', 1, (1,3,1), True), |
2294 | + ('K', 1, (1, 3, 2), False), |
2295 | + ('I', 1, (1, 3, 1), True), |
2296 | ('J', 0, (5,), False), |
2297 | - ('H', 1, (1,2,2), False), |
2298 | - ('F', 1, (1,2,1), True), |
2299 | + ('H', 1, (1, 2, 2), False), |
2300 | + ('F', 1, (1, 2, 1), True), |
2301 | ('G', 0, (4,), False), |
2302 | - ('E', 1, (1,1,2), False), |
2303 | - ('C', 1, (1,1,1), True), |
2304 | + ('E', 1, (1, 1, 2), False), |
2305 | + ('C', 1, (1, 1, 1), True), |
2306 | ('D', 0, (3,), False), |
2307 | ('B', 0, (2,), False), |
2308 | ('A', 0, (1,), True), |
2309 | @@ -610,16 +610,16 @@ |
2310 | }, |
2311 | 'N', |
2312 | [('N', 0, (7,), False), |
2313 | - ('M', 1, (1,4,1), True), |
2314 | + ('M', 1, (1, 4, 1), True), |
2315 | ('L', 0, (6,), False), |
2316 | - ('K', 1, (1,3,2), False), |
2317 | - ('I', 1, (1,3,1), True), |
2318 | + ('K', 1, (1, 3, 2), False), |
2319 | + ('I', 1, (1, 3, 1), True), |
2320 | ('J', 0, (5,), False), |
2321 | - ('H', 1, (1,2,2), False), |
2322 | - ('F', 1, (1,2,1), True), |
2323 | + ('H', 1, (1, 2, 2), False), |
2324 | + ('F', 1, (1, 2, 1), True), |
2325 | ('G', 0, (4,), False), |
2326 | - ('E', 1, (1,1,2), False), |
2327 | - ('C', 1, (1,1,1), True), |
2328 | + ('E', 1, (1, 1, 2), False), |
2329 | + ('C', 1, (1, 1, 1), True), |
2330 | ('D', 0, (3,), False), |
2331 | ('B', 0, (2,), False), |
2332 | ('A', 0, (1,), True), |
2333 | @@ -665,12 +665,12 @@ |
2334 | }, |
2335 | 'A', |
2336 | [('A', 0, (2,), False), |
2337 | - ('B', 1, (1,3,2), False), |
2338 | - ('C', 2, (1,4,1), True), |
2339 | - ('D', 1, (1,3,1), True), |
2340 | - ('E', 1, (1,1,2), False), |
2341 | - ('F', 2, (1,2,1), True), |
2342 | - ('G', 1, (1,1,1), True), |
2343 | + ('B', 1, (1, 3, 2), False), |
2344 | + ('C', 2, (1, 4, 1), True), |
2345 | + ('D', 1, (1, 3, 1), True), |
2346 | + ('E', 1, (1, 1, 2), False), |
2347 | + ('F', 2, (1, 2, 1), True), |
2348 | + ('G', 1, (1, 1, 1), True), |
2349 | ('H', 0, (1,), True), |
2350 | ], |
2351 | ) |
2352 | @@ -683,7 +683,7 @@ |
2353 | 'C': ['A', 'B']}, |
2354 | 'C', |
2355 | [('C', 0, (2,), False), |
2356 | - ('B', 1, (0,1,1), True), |
2357 | + ('B', 1, (0, 1, 1), True), |
2358 | ('A', 0, (1,), True), |
2359 | ], |
2360 | ) |
2361 | @@ -721,14 +721,14 @@ |
2362 | }, |
2363 | 'J', |
2364 | [('J', 0, (4,), False), |
2365 | - ('I', 1, (1,3,2), False), |
2366 | - ('H', 1, (1,3,1), True), |
2367 | + ('I', 1, (1, 3, 2), False), |
2368 | + ('H', 1, (1, 3, 1), True), |
2369 | ('G', 0, (3,), False), |
2370 | - ('F', 1, (1,2,2), False), |
2371 | - ('E', 1, (1,2,1), True), |
2372 | + ('F', 1, (1, 2, 2), False), |
2373 | + ('E', 1, (1, 2, 1), True), |
2374 | ('D', 0, (2,), False), |
2375 | - ('C', 1, (1,1,2), False), |
2376 | - ('B', 1, (1,1,1), True), |
2377 | + ('C', 1, (1, 1, 2), False), |
2378 | + ('B', 1, (1, 1, 1), True), |
2379 | ('A', 0, (1,), True), |
2380 | ], |
2381 | ) |
2382 | @@ -771,20 +771,20 @@ |
2383 | }, |
2384 | 'R', |
2385 | [('R', 0, (6,), False), |
2386 | - ('Q', 1, (0,4,5), False), |
2387 | - ('P', 2, (0,6,1), True), |
2388 | - ('O', 1, (0,4,4), False), |
2389 | - ('N', 1, (0,4,3), False), |
2390 | - ('M', 2, (0,5,1), True), |
2391 | - ('L', 1, (0,4,2), False), |
2392 | - ('K', 1, (0,4,1), True), |
2393 | + ('Q', 1, (0, 4, 5), False), |
2394 | + ('P', 2, (0, 6, 1), True), |
2395 | + ('O', 1, (0, 4, 4), False), |
2396 | + ('N', 1, (0, 4, 3), False), |
2397 | + ('M', 2, (0, 5, 1), True), |
2398 | + ('L', 1, (0, 4, 2), False), |
2399 | + ('K', 1, (0, 4, 1), True), |
2400 | ('J', 0, (5,), False), |
2401 | - ('I', 1, (0,3,1), True), |
2402 | + ('I', 1, (0, 3, 1), True), |
2403 | ('H', 0, (4,), False), |
2404 | - ('G', 1, (0,1,3), False), |
2405 | - ('F', 2, (0,2,1), True), |
2406 | - ('E', 1, (0,1,2), False), |
2407 | - ('D', 1, (0,1,1), True), |
2408 | + ('G', 1, (0, 1, 3), False), |
2409 | + ('F', 2, (0, 2, 1), True), |
2410 | + ('E', 1, (0, 1, 2), False), |
2411 | + ('D', 1, (0, 1, 1), True), |
2412 | ('C', 0, (3,), False), |
2413 | ('B', 0, (2,), False), |
2414 | ('A', 0, (1,), True), |
2415 | @@ -880,11 +880,11 @@ |
2416 | ('G', 'c'), ('G', 'b'), ('G', 'a'), |
2417 | ('Q', 'c'), ('Q', 'b'), ('Q', 'a'), |
2418 | ], |
2419 | - {('F', 'a'):(), ('F', 'b'): (('F', 'a'),), |
2420 | + {('F', 'a'): (), ('F', 'b'): (('F', 'a'),), |
2421 | ('F', 'c'): (('F', 'b'),), |
2422 | - ('G', 'a'):(), ('G', 'b'): (('G', 'a'),), |
2423 | + ('G', 'a'): (), ('G', 'b'): (('G', 'a'),), |
2424 | ('G', 'c'): (('G', 'b'),), |
2425 | - ('Q', 'a'):(), ('Q', 'b'): (('Q', 'a'),), |
2426 | + ('Q', 'a'): (), ('Q', 'b'): (('Q', 'a'),), |
2427 | ('Q', 'c'): (('Q', 'b'),), |
2428 | }) |
2429 | |
2430 | @@ -900,10 +900,10 @@ |
2431 | {'a':(), 'b':('a',), 'c':('a',), 'd':('a',), |
2432 | 'Z':('a',)}) |
2433 | self.assertSorted(['e', 'b', 'c', 'f', 'Z', 'd', 'a'], |
2434 | - {'a':(), 'b':('a',), 'c':('a',), 'd':('a',), |
2435 | - 'Z':('a',), |
2436 | - 'e':('b', 'c', 'd'), |
2437 | - 'f':('d', 'Z'), |
2438 | + {'a': (), 'b': ('a',), 'c': ('a',), 'd': ('a',), |
2439 | + 'Z': ('a',), |
2440 | + 'e': ('b', 'c', 'd'), |
2441 | + 'f': ('d', 'Z'), |
2442 | }) |
2443 | |
2444 | def test_skip_ghost(self): |
2445 | |
2446 | === modified file 'breezy/tests/test_bisect_multi.py' |
2447 | --- breezy/tests/test_bisect_multi.py 2017-05-22 00:56:52 +0000 |
2448 | +++ breezy/tests/test_bisect_multi.py 2017-11-12 14:04:35 +0000 |
2449 | @@ -84,7 +84,7 @@ |
2450 | # steps in the worst case there. |
2451 | self.assertEqual([], |
2452 | list(bisect_multi_bytes( |
2453 | - missing_first_content,268435456 - 1 , ['foo', 'bar']))) |
2454 | + missing_first_content, 268435456 - 1, ['foo', 'bar']))) |
2455 | self.assertEqual([ |
2456 | [(134217727, 'foo'), (134217727, 'bar')], |
2457 | [(67108864, 'foo'), (67108864, 'bar')], |
2458 | @@ -177,7 +177,7 @@ |
2459 | # assertion. |
2460 | self.assertEqual([], |
2461 | list(bisect_multi_bytes( |
2462 | - missing_last_content,268435456 - 1 , ['foo', 'bar']))) |
2463 | + missing_last_content, 268435456 - 1, ['foo', 'bar']))) |
2464 | self.assertEqual([ |
2465 | [(134217727, 'foo'), (134217727, 'bar')], |
2466 | [(201326590, 'foo'), (201326590, 'bar')], |
2467 | |
2468 | === modified file 'breezy/tests/test_bundle.py' |
2469 | --- breezy/tests/test_bundle.py 2017-06-10 16:40:42 +0000 |
2470 | +++ breezy/tests/test_bundle.py 2017-11-12 14:04:35 +0000 |
2471 | @@ -118,7 +118,7 @@ |
2472 | return kind |
2473 | |
2474 | def make_entry(self, file_id, path): |
2475 | - from ..bzr.inventory import (InventoryFile , InventoryDirectory, |
2476 | + from ..bzr.inventory import (InventoryFile, InventoryDirectory, |
2477 | InventoryLink) |
2478 | name = os.path.basename(path) |
2479 | kind = self.kind(file_id) |
2480 | @@ -156,7 +156,7 @@ |
2481 | def get_file(self, file_id): |
2482 | result = BytesIO() |
2483 | result.write(self.contents[file_id]) |
2484 | - result.seek(0,0) |
2485 | + result.seek(0, 0) |
2486 | return result |
2487 | |
2488 | def get_file_revision(self, file_id): |
2489 | @@ -260,7 +260,7 @@ |
2490 | def unified_diff(self, old, new): |
2491 | out = BytesIO() |
2492 | diff.internal_diff("old", old, "new", new, out) |
2493 | - out.seek(0,0) |
2494 | + out.seek(0, 0) |
2495 | return out.read() |
2496 | |
2497 | def make_tree_2(self): |
2498 | @@ -709,7 +709,7 @@ |
2499 | tt.apply() |
2500 | self.tree1.commit('add symlink', rev_id='l@cset-0-1') |
2501 | bundle = self.get_valid_bundle('null:', 'l@cset-0-1') |
2502 | - if getattr(bundle ,'revision_tree', None) is not None: |
2503 | + if getattr(bundle, 'revision_tree', None) is not None: |
2504 | # Not all bundle formats supports revision_tree |
2505 | bund_tree = bundle.revision_tree(self.b1.repository, 'l@cset-0-1') |
2506 | self.assertEqual(link_target, bund_tree.get_symlink_target(link_id)) |
2507 | @@ -722,7 +722,7 @@ |
2508 | tt.apply() |
2509 | self.tree1.commit('rename and change symlink', rev_id='l@cset-0-2') |
2510 | bundle = self.get_valid_bundle('l@cset-0-1', 'l@cset-0-2') |
2511 | - if getattr(bundle ,'revision_tree', None) is not None: |
2512 | + if getattr(bundle, 'revision_tree', None) is not None: |
2513 | # Not all bundle formats supports revision_tree |
2514 | bund_tree = bundle.revision_tree(self.b1.repository, 'l@cset-0-2') |
2515 | self.assertEqual(new_link_target, |
2516 | |
2517 | === modified file 'breezy/tests/test_chk_map.py' |
2518 | --- breezy/tests/test_chk_map.py 2017-06-08 23:30:31 +0000 |
2519 | +++ breezy/tests/test_chk_map.py 2017-11-12 14:04:35 +0000 |
2520 | @@ -1155,7 +1155,7 @@ |
2521 | |
2522 | def test_iteritems_keys_prefixed_by_2_width_nodes(self): |
2523 | chkmap = self._get_map( |
2524 | - {("a","a"):"content here", ("a", "b",):"more content", |
2525 | + {("a", "a"):"content here", ("a", "b",):"more content", |
2526 | ("b", ""): 'boring content'}, |
2527 | maximum_size=10, key_width=2) |
2528 | self.assertEqual( |
2529 | @@ -1171,7 +1171,7 @@ |
2530 | self.assertEqual('71BEEFF9\x0000000000', |
2531 | search_key_func(StaticTuple('b', ''))) |
2532 | chkmap = self._get_map( |
2533 | - {("a","a"):"content here", ("a", "b",):"more content", |
2534 | + {("a", "a"):"content here", ("a", "b",):"more content", |
2535 | ("b", ""): 'boring content'}, |
2536 | maximum_size=10, key_width=2, search_key_func=search_key_func) |
2537 | self.assertEqual( |
2538 | @@ -1180,7 +1180,7 @@ |
2539 | |
2540 | def test_iteritems_keys_prefixed_by_2_width_one_leaf(self): |
2541 | chkmap = self._get_map( |
2542 | - {("a","a"):"content here", ("a", "b",):"more content", |
2543 | + {("a", "a"):"content here", ("a", "b",):"more content", |
2544 | ("b", ""): 'boring content'}, key_width=2) |
2545 | self.assertEqual( |
2546 | {("a", "a"): "content here", ("a", "b"): 'more content'}, |
2547 | |
2548 | === modified file 'breezy/tests/test_clean_tree.py' |
2549 | --- breezy/tests/test_clean_tree.py 2017-06-10 00:17:06 +0000 |
2550 | +++ breezy/tests/test_clean_tree.py 2017-11-12 14:04:35 +0000 |
2551 | @@ -65,17 +65,17 @@ |
2552 | transport.put_bytes('file', 'contents') |
2553 | transport.put_bytes('file~', 'contents') |
2554 | transport.put_bytes('file.pyc', 'contents') |
2555 | - dels = sorted([r for a,r in iter_deletables(tree, unknown=True)]) |
2556 | + dels = sorted([r for a, r in iter_deletables(tree, unknown=True)]) |
2557 | self.assertEqual(['file', 'file.BASE'], dels) |
2558 | |
2559 | - dels = [r for a,r in iter_deletables(tree, detritus=True)] |
2560 | + dels = [r for a, r in iter_deletables(tree, detritus=True)] |
2561 | self.assertEqual(sorted(['file~', 'file.BASE']), dels) |
2562 | |
2563 | - dels = [r for a,r in iter_deletables(tree, ignored=True)] |
2564 | + dels = [r for a, r in iter_deletables(tree, ignored=True)] |
2565 | self.assertEqual(sorted(['file~', 'file.pyc', '.bzrignore']), |
2566 | dels) |
2567 | |
2568 | - dels = [r for a,r in iter_deletables(tree, unknown=False)] |
2569 | + dels = [r for a, r in iter_deletables(tree, unknown=False)] |
2570 | self.assertEqual([], dels) |
2571 | finally: |
2572 | tree.unlock() |
2573 | |
2574 | === modified file 'breezy/tests/test_config.py' |
2575 | --- breezy/tests/test_config.py 2017-10-27 00:18:42 +0000 |
2576 | +++ breezy/tests/test_config.py 2017-11-12 14:04:35 +0000 |
2577 | @@ -765,7 +765,7 @@ |
2578 | return c |
2579 | |
2580 | def test_dont_cross_unrelated_section(self): |
2581 | - c = self.get_config('/another/branch/path',''' |
2582 | + c = self.get_config('/another/branch/path', ''' |
2583 | [/one/branch/path] |
2584 | foo = hello |
2585 | bar = {foo}/2 |
2586 | @@ -777,7 +777,7 @@ |
2587 | c.get_user_option, 'bar', expand=True) |
2588 | |
2589 | def test_cross_related_sections(self): |
2590 | - c = self.get_config('/project/branch/path',''' |
2591 | + c = self.get_config('/project/branch/path', ''' |
2592 | [/project] |
2593 | foo = qu |
2594 | |
2595 | @@ -1913,7 +1913,7 @@ |
2596 | # caused by the differences in implementations betwen |
2597 | # SmartServerBzrDirRequestConfigFile (in smart/bzrdir.py) and |
2598 | # SmartServerBranchGetConfigFile (in smart/branch.py) |
2599 | - self.assertLoadHook(2 ,'file', remote.RemoteBzrDirConfig, remote_bzrdir) |
2600 | + self.assertLoadHook(2, 'file', remote.RemoteBzrDirConfig, remote_bzrdir) |
2601 | |
2602 | def assertSaveHook(self, conf): |
2603 | calls = [] |
2604 | @@ -3797,7 +3797,7 @@ |
2605 | return c |
2606 | |
2607 | def test_dont_cross_unrelated_section(self): |
2608 | - c = self.get_config('/another/branch/path',''' |
2609 | + c = self.get_config('/another/branch/path', ''' |
2610 | [/one/branch/path] |
2611 | foo = hello |
2612 | bar = {foo}/2 |
2613 | @@ -3809,7 +3809,7 @@ |
2614 | c.get, 'bar', expand=True) |
2615 | |
2616 | def test_cross_related_sections(self): |
2617 | - c = self.get_config('/project/branch/path',''' |
2618 | + c = self.get_config('/project/branch/path', ''' |
2619 | [/project] |
2620 | foo = qu |
2621 | |
2622 | @@ -4332,7 +4332,7 @@ |
2623 | conf, 'http', host='bar.org', path='/dir2') |
2624 | # matching subdir |
2625 | self._got_user_passwd('jim', 'jimpass', |
2626 | - conf, 'http', host='bar.org',path='/dir1/subdir') |
2627 | + conf, 'http', host='bar.org', path='/dir1/subdir') |
2628 | |
2629 | def test_credentials_for_user(self): |
2630 | conf = config.AuthenticationConfig(_file=BytesIO(b""" |
2631 | |
2632 | === modified file 'breezy/tests/test_conflicts.py' |
2633 | --- breezy/tests/test_conflicts.py 2017-07-14 21:15:49 +0000 |
2634 | +++ breezy/tests/test_conflicts.py 2017-11-12 14:04:35 +0000 |
2635 | @@ -1061,7 +1061,7 @@ |
2636 | # trunk switched. As such it should certainly produce the same |
2637 | # conflict. |
2638 | self.assertRaises(errors.MalformedTransform, |
2639 | - self.run_script,""" |
2640 | + self.run_script, """ |
2641 | $ brz init trunk |
2642 | ... |
2643 | $ cd trunk |
2644 | |
2645 | === modified file 'breezy/tests/test_delta.py' |
2646 | --- breezy/tests/test_delta.py 2017-05-24 20:47:06 +0000 |
2647 | +++ breezy/tests/test_delta.py 2017-11-12 14:04:35 +0000 |
2648 | @@ -136,12 +136,12 @@ |
2649 | "Operating on whole tree but only reporting on 'my' view.", |
2650 | " M path"] |
2651 | self.assertReportLines(expected_lines, modified='modified', |
2652 | - view_info=('my',['path'])) |
2653 | + view_info=('my', ['path'])) |
2654 | # If a file in outside the view, it should not appear in the output |
2655 | expected_lines = [ |
2656 | "Operating on whole tree but only reporting on 'my' view."] |
2657 | self.assertReportLines(expected_lines, modified='modified', |
2658 | - path="foo", view_info=('my',['path'])) |
2659 | + path="foo", view_info=('my', ['path'])) |
2660 | |
2661 | def assertChangesEqual(self, |
2662 | file_id='fid', |
2663 | |
2664 | === modified file 'breezy/tests/test_diff.py' |
2665 | --- breezy/tests/test_diff.py 2017-10-27 00:18:42 +0000 |
2666 | +++ breezy/tests/test_diff.py 2017-11-12 14:04:35 +0000 |
2667 | @@ -150,9 +150,9 @@ |
2668 | def test_binary_lines(self): |
2669 | empty = [] |
2670 | uni_lines = [1023 * 'a' + '\x00'] |
2671 | - self.assertRaises(errors.BinaryFile, udiff_lines, uni_lines , empty) |
2672 | + self.assertRaises(errors.BinaryFile, udiff_lines, uni_lines, empty) |
2673 | self.assertRaises(errors.BinaryFile, udiff_lines, empty, uni_lines) |
2674 | - udiff_lines(uni_lines , empty, allow_binary=True) |
2675 | + udiff_lines(uni_lines, empty, allow_binary=True) |
2676 | udiff_lines(empty, uni_lines, allow_binary=True) |
2677 | |
2678 | def test_external_diff(self): |
2679 | @@ -254,10 +254,10 @@ |
2680 | |
2681 | def test_internal_diff_default_context(self): |
2682 | output = BytesIO() |
2683 | - diff.internal_diff('old', ['same_text\n','same_text\n','same_text\n', |
2684 | - 'same_text\n','same_text\n','old_text\n'], |
2685 | - 'new', ['same_text\n','same_text\n','same_text\n', |
2686 | - 'same_text\n','same_text\n','new_text\n'], output) |
2687 | + diff.internal_diff('old', ['same_text\n', 'same_text\n', 'same_text\n', |
2688 | + 'same_text\n', 'same_text\n', 'old_text\n'], |
2689 | + 'new', ['same_text\n', 'same_text\n', 'same_text\n', |
2690 | + 'same_text\n', 'same_text\n', 'new_text\n'], output) |
2691 | lines = output.getvalue().splitlines(True) |
2692 | self.check_patch(lines) |
2693 | self.assertEqual(['--- old\n', |
2694 | @@ -274,10 +274,10 @@ |
2695 | |
2696 | def test_internal_diff_no_context(self): |
2697 | output = BytesIO() |
2698 | - diff.internal_diff('old', ['same_text\n','same_text\n','same_text\n', |
2699 | - 'same_text\n','same_text\n','old_text\n'], |
2700 | - 'new', ['same_text\n','same_text\n','same_text\n', |
2701 | - 'same_text\n','same_text\n','new_text\n'], output, |
2702 | + diff.internal_diff('old', ['same_text\n', 'same_text\n', 'same_text\n', |
2703 | + 'same_text\n', 'same_text\n', 'old_text\n'], |
2704 | + 'new', ['same_text\n', 'same_text\n', 'same_text\n', |
2705 | + 'same_text\n', 'same_text\n', 'new_text\n'], output, |
2706 | context_lines=0) |
2707 | lines = output.getvalue().splitlines(True) |
2708 | self.check_patch(lines) |
2709 | @@ -292,10 +292,10 @@ |
2710 | |
2711 | def test_internal_diff_more_context(self): |
2712 | output = BytesIO() |
2713 | - diff.internal_diff('old', ['same_text\n','same_text\n','same_text\n', |
2714 | - 'same_text\n','same_text\n','old_text\n'], |
2715 | - 'new', ['same_text\n','same_text\n','same_text\n', |
2716 | - 'same_text\n','same_text\n','new_text\n'], output, |
2717 | + diff.internal_diff('old', ['same_text\n', 'same_text\n', 'same_text\n', |
2718 | + 'same_text\n', 'same_text\n', 'old_text\n'], |
2719 | + 'new', ['same_text\n', 'same_text\n', 'same_text\n', |
2720 | + 'same_text\n', 'same_text\n', 'new_text\n'], output, |
2721 | context_lines=4) |
2722 | lines = output.getvalue().splitlines(True) |
2723 | self.check_patch(lines) |
2724 | @@ -886,14 +886,14 @@ |
2725 | self.assertEqual(unique_lcs('', ''), []) |
2726 | self.assertEqual(unique_lcs('', 'a'), []) |
2727 | self.assertEqual(unique_lcs('a', ''), []) |
2728 | - self.assertEqual(unique_lcs('a', 'a'), [(0,0)]) |
2729 | + self.assertEqual(unique_lcs('a', 'a'), [(0, 0)]) |
2730 | self.assertEqual(unique_lcs('a', 'b'), []) |
2731 | - self.assertEqual(unique_lcs('ab', 'ab'), [(0,0), (1,1)]) |
2732 | - self.assertEqual(unique_lcs('abcde', 'cdeab'), [(2,0), (3,1), (4,2)]) |
2733 | - self.assertEqual(unique_lcs('cdeab', 'abcde'), [(0,2), (1,3), (2,4)]) |
2734 | - self.assertEqual(unique_lcs('abXde', 'abYde'), [(0,0), (1,1), |
2735 | - (3,3), (4,4)]) |
2736 | - self.assertEqual(unique_lcs('acbac', 'abc'), [(2,1)]) |
2737 | + self.assertEqual(unique_lcs('ab', 'ab'), [(0, 0), (1, 1)]) |
2738 | + self.assertEqual(unique_lcs('abcde', 'cdeab'), [(2, 0), (3, 1), (4, 2)]) |
2739 | + self.assertEqual(unique_lcs('cdeab', 'abcde'), [(0, 2), (1, 3), (2, 4)]) |
2740 | + self.assertEqual(unique_lcs('abXde', 'abYde'), [(0, 0), (1, 1), |
2741 | + (3, 3), (4, 4)]) |
2742 | + self.assertEqual(unique_lcs('acbac', 'abc'), [(2, 1)]) |
2743 | |
2744 | def test_recurse_matches(self): |
2745 | def test_one(a, b, matches): |
2746 | @@ -909,7 +909,7 @@ |
2747 | # Even though 'bc' is not unique globally, and is surrounded by |
2748 | # non-matching lines, we should still match, because they are locally |
2749 | # unique |
2750 | - test_one('abcdbce', 'afbcgdbce', [(0,0), (1, 2), (2, 3), (3, 5), |
2751 | + test_one('abcdbce', 'afbcgdbce', [(0, 0), (1, 2), (2, 3), (3, 5), |
2752 | (4, 6), (5, 7), (6, 8)]) |
2753 | |
2754 | # recurse_matches doesn't match non-unique |
2755 | @@ -920,7 +920,7 @@ |
2756 | #test_one('aBccDe', 'abccde', [(0,0), (2,2), (3,3), (5,5)]) |
2757 | |
2758 | # This is what it currently gives: |
2759 | - test_one('aBccDe', 'abccde', [(0,0), (5,5)]) |
2760 | + test_one('aBccDe', 'abccde', [(0, 0), (5, 5)]) |
2761 | |
2762 | def assertDiffBlocks(self, a, b, expected_blocks): |
2763 | """Check that the sequence matcher returns the correct blocks. |
2764 | @@ -968,19 +968,19 @@ |
2765 | |
2766 | # non unique lines surrounded by non-matching lines |
2767 | # won't be found |
2768 | - self.assertDiffBlocks('aBccDe', 'abccde', [(0,0,1), (5,5,1)]) |
2769 | + self.assertDiffBlocks('aBccDe', 'abccde', [(0, 0, 1), (5, 5, 1)]) |
2770 | |
2771 | # But they only need to be locally unique |
2772 | - self.assertDiffBlocks('aBcDec', 'abcdec', [(0,0,1), (2,2,1), (4,4,2)]) |
2773 | + self.assertDiffBlocks('aBcDec', 'abcdec', [(0, 0, 1), (2, 2, 1), (4, 4, 2)]) |
2774 | |
2775 | # non unique blocks won't be matched |
2776 | - self.assertDiffBlocks('aBcdEcdFg', 'abcdecdfg', [(0,0,1), (8,8,1)]) |
2777 | + self.assertDiffBlocks('aBcdEcdFg', 'abcdecdfg', [(0, 0, 1), (8, 8, 1)]) |
2778 | |
2779 | # but locally unique ones will |
2780 | - self.assertDiffBlocks('aBcdEeXcdFg', 'abcdecdfg', [(0,0,1), (2,2,2), |
2781 | - (5,4,1), (7,5,2), (10,8,1)]) |
2782 | + self.assertDiffBlocks('aBcdEeXcdFg', 'abcdecdfg', [(0, 0, 1), (2, 2, 2), |
2783 | + (5, 4, 1), (7, 5, 2), (10, 8, 1)]) |
2784 | |
2785 | - self.assertDiffBlocks('abbabbXd', 'cabbabxd', [(7,7,1)]) |
2786 | + self.assertDiffBlocks('abbabbXd', 'cabbabxd', [(7, 7, 1)]) |
2787 | self.assertDiffBlocks('abbabbbb', 'cabbabbc', []) |
2788 | self.assertDiffBlocks('bbbbbbbb', 'cbbbbbbc', []) |
2789 | |
2790 | @@ -1015,35 +1015,35 @@ |
2791 | |
2792 | chk_ops('', '', []) |
2793 | chk_ops([], [], []) |
2794 | - chk_ops('abc', '', [('delete', 0,3, 0,0)]) |
2795 | - chk_ops('', 'abc', [('insert', 0,0, 0,3)]) |
2796 | - chk_ops('abcd', 'abcd', [('equal', 0,4, 0,4)]) |
2797 | - chk_ops('abcd', 'abce', [('equal', 0,3, 0,3), |
2798 | - ('replace', 3,4, 3,4) |
2799 | - ]) |
2800 | - chk_ops('eabc', 'abce', [('delete', 0,1, 0,0), |
2801 | - ('equal', 1,4, 0,3), |
2802 | - ('insert', 4,4, 3,4) |
2803 | - ]) |
2804 | - chk_ops('eabce', 'abce', [('delete', 0,1, 0,0), |
2805 | - ('equal', 1,5, 0,4) |
2806 | + chk_ops('abc', '', [('delete', 0, 3, 0, 0)]) |
2807 | + chk_ops('', 'abc', [('insert', 0, 0, 0, 3)]) |
2808 | + chk_ops('abcd', 'abcd', [('equal', 0, 4, 0, 4)]) |
2809 | + chk_ops('abcd', 'abce', [('equal', 0, 3, 0, 3), |
2810 | + ('replace', 3, 4, 3, 4) |
2811 | + ]) |
2812 | + chk_ops('eabc', 'abce', [('delete', 0, 1, 0, 0), |
2813 | + ('equal', 1, 4, 0, 3), |
2814 | + ('insert', 4, 4, 3, 4) |
2815 | + ]) |
2816 | + chk_ops('eabce', 'abce', [('delete', 0, 1, 0, 0), |
2817 | + ('equal', 1, 5, 0, 4) |
2818 | ]) |
2819 | - chk_ops('abcde', 'abXde', [('equal', 0,2, 0,2), |
2820 | - ('replace', 2,3, 2,3), |
2821 | - ('equal', 3,5, 3,5) |
2822 | + chk_ops('abcde', 'abXde', [('equal', 0, 2, 0, 2), |
2823 | + ('replace', 2, 3, 2, 3), |
2824 | + ('equal', 3, 5, 3, 5) |
2825 | ]) |
2826 | - chk_ops('abcde', 'abXYZde', [('equal', 0,2, 0,2), |
2827 | - ('replace', 2,3, 2,5), |
2828 | - ('equal', 3,5, 5,7) |
2829 | + chk_ops('abcde', 'abXYZde', [('equal', 0, 2, 0, 2), |
2830 | + ('replace', 2, 3, 2, 5), |
2831 | + ('equal', 3, 5, 5, 7) |
2832 | ]) |
2833 | - chk_ops('abde', 'abXYZde', [('equal', 0,2, 0,2), |
2834 | - ('insert', 2,2, 2,5), |
2835 | - ('equal', 2,4, 5,7) |
2836 | + chk_ops('abde', 'abXYZde', [('equal', 0, 2, 0, 2), |
2837 | + ('insert', 2, 2, 2, 5), |
2838 | + ('equal', 2, 4, 5, 7) |
2839 | ]) |
2840 | chk_ops('abcdefghijklmnop', 'abcdefxydefghijklmnop', |
2841 | - [('equal', 0,6, 0,6), |
2842 | - ('insert', 6,6, 6,11), |
2843 | - ('equal', 6,16, 11,21) |
2844 | + [('equal', 0, 6, 0, 6), |
2845 | + ('insert', 6, 6, 6, 11), |
2846 | + ('equal', 6, 16, 11, 21) |
2847 | ]) |
2848 | chk_ops( |
2849 | [ 'hello there\n' |
2850 | @@ -1051,37 +1051,37 @@ |
2851 | , 'how are you today?\n'], |
2852 | [ 'hello there\n' |
2853 | , 'how are you today?\n'], |
2854 | - [('equal', 0,1, 0,1), |
2855 | - ('delete', 1,2, 1,1), |
2856 | - ('equal', 2,3, 1,2), |
2857 | + [('equal', 0, 1, 0, 1), |
2858 | + ('delete', 1, 2, 1, 1), |
2859 | + ('equal', 2, 3, 1, 2), |
2860 | ]) |
2861 | chk_ops('aBccDe', 'abccde', |
2862 | - [('equal', 0,1, 0,1), |
2863 | - ('replace', 1,5, 1,5), |
2864 | - ('equal', 5,6, 5,6), |
2865 | + [('equal', 0, 1, 0, 1), |
2866 | + ('replace', 1, 5, 1, 5), |
2867 | + ('equal', 5, 6, 5, 6), |
2868 | ]) |
2869 | chk_ops('aBcDec', 'abcdec', |
2870 | - [('equal', 0,1, 0,1), |
2871 | - ('replace', 1,2, 1,2), |
2872 | - ('equal', 2,3, 2,3), |
2873 | - ('replace', 3,4, 3,4), |
2874 | - ('equal', 4,6, 4,6), |
2875 | + [('equal', 0, 1, 0, 1), |
2876 | + ('replace', 1, 2, 1, 2), |
2877 | + ('equal', 2, 3, 2, 3), |
2878 | + ('replace', 3, 4, 3, 4), |
2879 | + ('equal', 4, 6, 4, 6), |
2880 | ]) |
2881 | chk_ops('aBcdEcdFg', 'abcdecdfg', |
2882 | - [('equal', 0,1, 0,1), |
2883 | - ('replace', 1,8, 1,8), |
2884 | - ('equal', 8,9, 8,9) |
2885 | + [('equal', 0, 1, 0, 1), |
2886 | + ('replace', 1, 8, 1, 8), |
2887 | + ('equal', 8, 9, 8, 9) |
2888 | ]) |
2889 | chk_ops('aBcdEeXcdFg', 'abcdecdfg', |
2890 | - [('equal', 0,1, 0,1), |
2891 | - ('replace', 1,2, 1,2), |
2892 | - ('equal', 2,4, 2,4), |
2893 | - ('delete', 4,5, 4,4), |
2894 | - ('equal', 5,6, 4,5), |
2895 | - ('delete', 6,7, 5,5), |
2896 | - ('equal', 7,9, 5,7), |
2897 | - ('replace', 9,10, 7,8), |
2898 | - ('equal', 10,11, 8,9) |
2899 | + [('equal', 0, 1, 0, 1), |
2900 | + ('replace', 1, 2, 1, 2), |
2901 | + ('equal', 2, 4, 2, 4), |
2902 | + ('delete', 4, 5, 4, 4), |
2903 | + ('equal', 5, 6, 4, 5), |
2904 | + ('delete', 6, 7, 5, 5), |
2905 | + ('equal', 7, 9, 5, 7), |
2906 | + ('replace', 9, 10, 7, 8), |
2907 | + ('equal', 10, 11, 8, 9) |
2908 | ]) |
2909 | |
2910 | def test_grouped_opcodes(self): |
2911 | @@ -1091,33 +1091,33 @@ |
2912 | |
2913 | chk_ops('', '', []) |
2914 | chk_ops([], [], []) |
2915 | - chk_ops('abc', '', [[('delete', 0,3, 0,0)]]) |
2916 | - chk_ops('', 'abc', [[('insert', 0,0, 0,3)]]) |
2917 | + chk_ops('abc', '', [[('delete', 0, 3, 0, 0)]]) |
2918 | + chk_ops('', 'abc', [[('insert', 0, 0, 0, 3)]]) |
2919 | chk_ops('abcd', 'abcd', []) |
2920 | - chk_ops('abcd', 'abce', [[('equal', 0,3, 0,3), |
2921 | - ('replace', 3,4, 3,4) |
2922 | + chk_ops('abcd', 'abce', [[('equal', 0, 3, 0, 3), |
2923 | + ('replace', 3, 4, 3, 4) |
2924 | ]]) |
2925 | - chk_ops('eabc', 'abce', [[('delete', 0,1, 0,0), |
2926 | - ('equal', 1,4, 0,3), |
2927 | - ('insert', 4,4, 3,4) |
2928 | + chk_ops('eabc', 'abce', [[('delete', 0, 1, 0, 0), |
2929 | + ('equal', 1, 4, 0, 3), |
2930 | + ('insert', 4, 4, 3, 4) |
2931 | ]]) |
2932 | chk_ops('abcdefghijklmnop', 'abcdefxydefghijklmnop', |
2933 | - [[('equal', 3,6, 3,6), |
2934 | - ('insert', 6,6, 6,11), |
2935 | - ('equal', 6,9, 11,14) |
2936 | + [[('equal', 3, 6, 3, 6), |
2937 | + ('insert', 6, 6, 6, 11), |
2938 | + ('equal', 6, 9, 11, 14) |
2939 | ]]) |
2940 | chk_ops('abcdefghijklmnop', 'abcdefxydefghijklmnop', |
2941 | - [[('equal', 2,6, 2,6), |
2942 | - ('insert', 6,6, 6,11), |
2943 | - ('equal', 6,10, 11,15) |
2944 | + [[('equal', 2, 6, 2, 6), |
2945 | + ('insert', 6, 6, 6, 11), |
2946 | + ('equal', 6, 10, 11, 15) |
2947 | ]], 4) |
2948 | chk_ops('Xabcdef', 'abcdef', |
2949 | - [[('delete', 0,1, 0,0), |
2950 | - ('equal', 1,4, 0,3) |
2951 | + [[('delete', 0, 1, 0, 0), |
2952 | + ('equal', 1, 4, 0, 3) |
2953 | ]]) |
2954 | chk_ops('abcdef', 'abcdefX', |
2955 | - [[('equal', 3,6, 3,6), |
2956 | - ('insert', 6,6, 6,7) |
2957 | + [[('equal', 3, 6, 3, 6), |
2958 | + ('insert', 6, 6, 6, 7) |
2959 | ]]) |
2960 | |
2961 | |
2962 | @@ -1130,7 +1130,7 @@ |
2963 | |
2964 | self.assertDiffBlocks('ABCd efghIjk L', |
2965 | 'AxyzBCn mo pqrstuvwI1 2 L', |
2966 | - [(0,0,1), (1, 4, 2), (9, 19, 1), (12, 23, 3)]) |
2967 | + [(0, 0, 1), (1, 4, 2), (9, 19, 1), (12, 23, 3)]) |
2968 | |
2969 | # These are rot13 code snippets. |
2970 | self.assertDiffBlocks('''\ |
2971 | @@ -1177,7 +1177,7 @@ |
2972 | |
2973 | pynff pzq_zxqve(Pbzznaq): |
2974 | '''.splitlines(True) |
2975 | -, [(0,0,1), (1, 4, 2), (9, 19, 1), (12, 23, 3)]) |
2976 | +, [(0, 0, 1), (1, 4, 2), (9, 19, 1), (12, 23, 3)]) |
2977 | |
2978 | def test_patience_unified_diff(self): |
2979 | txt_a = ['hello there\n', |
2980 | |
2981 | === modified file 'breezy/tests/test_dirstate.py' |
2982 | --- breezy/tests/test_dirstate.py 2017-07-30 21:23:44 +0000 |
2983 | +++ breezy/tests/test_dirstate.py 2017-11-12 14:04:35 +0000 |
2984 | @@ -255,35 +255,35 @@ |
2985 | f_len = len(f_text) |
2986 | null_stat = dirstate.DirState.NULLSTAT |
2987 | expected = { |
2988 | - '':(('', '', 'TREE_ROOT'), [ |
2989 | + '': (('', '', 'TREE_ROOT'), [ |
2990 | ('d', '', 0, False, null_stat), |
2991 | ('d', '', 0, False, revision_id), |
2992 | ]), |
2993 | - 'a':(('', 'a', 'a-id'), [ |
2994 | + 'a': (('', 'a', 'a-id'), [ |
2995 | ('f', '', 0, False, null_stat), |
2996 | ('f', a_sha, a_len, False, revision_id), |
2997 | ]), |
2998 | - 'b':(('', 'b', 'b-id'), [ |
2999 | + 'b': (('', 'b', 'b-id'), [ |
3000 | ('d', '', 0, False, null_stat), |
3001 | ('d', '', 0, False, revision_id), |
3002 | ]), |
3003 | - 'b/c':(('b', 'c', 'c-id'), [ |
3004 | + 'b/c': (('b', 'c', 'c-id'), [ |
3005 | ('f', '', 0, False, null_stat), |
3006 | ('f', c_sha, c_len, False, revision_id), |
3007 | ]), |
3008 | - 'b/d':(('b', 'd', 'd-id'), [ |
3009 | + 'b/d': (('b', 'd', 'd-id'), [ |
3010 | ('d', '', 0, False, null_stat), |
3011 | ('d', '', 0, False, revision_id), |
3012 | ]), |
3013 | - 'b/d/e':(('b/d', 'e', 'e-id'), [ |
3014 | + 'b/d/e': (('b/d', 'e', 'e-id'), [ |
3015 | ('f', '', 0, False, null_stat), |
3016 | ('f', e_sha, e_len, False, revision_id), |
3017 | ]), |
3018 | - 'b-c':(('', 'b-c', 'b-c-id'), [ |
3019 | + 'b-c': (('', 'b-c', 'b-c-id'), [ |
3020 | ('f', '', 0, False, null_stat), |
3021 | ('f', b_c_sha, b_c_len, False, revision_id), |
3022 | ]), |
3023 | - 'f':(('', 'f', 'f-id'), [ |
3024 | + 'f': (('', 'f', 'f-id'), [ |
3025 | ('f', '', 0, False, null_stat), |
3026 | ('f', f_sha, f_len, False, revision_id), |
3027 | ]), |
3028 | @@ -2027,15 +2027,15 @@ |
3029 | """Test bisect when there is only 1 page to read""" |
3030 | tree, state, expected = self.create_basic_dirstate() |
3031 | state._bisect_page_size = 5000 |
3032 | - self.assertBisect(expected,[['']], state, ['']) |
3033 | - self.assertBisect(expected,[['a']], state, ['a']) |
3034 | - self.assertBisect(expected,[['b']], state, ['b']) |
3035 | - self.assertBisect(expected,[['b/c']], state, ['b/c']) |
3036 | - self.assertBisect(expected,[['b/d']], state, ['b/d']) |
3037 | - self.assertBisect(expected,[['b/d/e']], state, ['b/d/e']) |
3038 | - self.assertBisect(expected,[['b-c']], state, ['b-c']) |
3039 | - self.assertBisect(expected,[['f']], state, ['f']) |
3040 | - self.assertBisect(expected,[['a'], ['b'], ['f']], |
3041 | + self.assertBisect(expected, [['']], state, ['']) |
3042 | + self.assertBisect(expected, [['a']], state, ['a']) |
3043 | + self.assertBisect(expected, [['b']], state, ['b']) |
3044 | + self.assertBisect(expected, [['b/c']], state, ['b/c']) |
3045 | + self.assertBisect(expected, [['b/d']], state, ['b/d']) |
3046 | + self.assertBisect(expected, [['b/d/e']], state, ['b/d/e']) |
3047 | + self.assertBisect(expected, [['b-c']], state, ['b-c']) |
3048 | + self.assertBisect(expected, [['f']], state, ['f']) |
3049 | + self.assertBisect(expected, [['a'], ['b'], ['f']], |
3050 | state, ['a', 'b', 'f']) |
3051 | self.assertBisect(expected, [['b/d'], ['b/d/e'], ['f']], |
3052 | state, ['b/d', 'b/d/e', 'f']) |
3053 | |
3054 | === modified file 'breezy/tests/test_email_message.py' |
3055 | --- breezy/tests/test_email_message.py 2017-09-26 00:55:04 +0000 |
3056 | +++ breezy/tests/test_email_message.py 2017-11-12 14:04:35 +0000 |
3057 | @@ -106,7 +106,7 @@ |
3058 | |
3059 | def test_empty_message(self): |
3060 | msg = EmailMessage('from@from.com', 'to@to.com', 'subject') |
3061 | - self.assertEqualDiff(EMPTY_MESSAGE , msg.as_string()) |
3062 | + self.assertEqualDiff(EMPTY_MESSAGE, msg.as_string()) |
3063 | |
3064 | def test_simple_message(self): |
3065 | pairs = { |
3066 | |
3067 | === modified file 'breezy/tests/test_eol_filters.py' |
3068 | --- breezy/tests/test_eol_filters.py 2017-05-22 00:56:52 +0000 |
3069 | +++ breezy/tests/test_eol_filters.py 2017-11-12 14:04:35 +0000 |
3070 | @@ -47,7 +47,7 @@ |
3071 | |
3072 | def test_exact_value(self): |
3073 | """'eol = exact' should have no content filters""" |
3074 | - prefs = (('eol','exact'),) |
3075 | + prefs = (('eol', 'exact'),) |
3076 | self.assertEqual([], _get_filter_stack_for(prefs)) |
3077 | |
3078 | def test_other_known_values(self): |
3079 | @@ -56,14 +56,14 @@ |
3080 | 'native-with-crlf-in-repo', 'lf-with-crlf-in-repo', |
3081 | 'crlf-with-crlf-in-repo') |
3082 | for value in known_values: |
3083 | - prefs = (('eol',value),) |
3084 | + prefs = (('eol', value),) |
3085 | self.assertNotEqual([], _get_filter_stack_for(prefs)) |
3086 | |
3087 | def test_unknown_value(self): |
3088 | """ |
3089 | Unknown eol values should raise an error. |
3090 | """ |
3091 | - prefs = (('eol','unknown-value'),) |
3092 | + prefs = (('eol', 'unknown-value'),) |
3093 | self.assertRaises(errors.BzrError, _get_filter_stack_for, prefs) |
3094 | |
3095 | def test_eol_missing_altogether_is_ok(self): |
3096 | |
3097 | === modified file 'breezy/tests/test_filters.py' |
3098 | --- breezy/tests/test_filters.py 2017-05-22 00:56:52 +0000 |
3099 | +++ breezy/tests/test_filters.py 2017-11-12 14:04:35 +0000 |
3100 | @@ -105,7 +105,7 @@ |
3101 | post_filtered_content = ''.join(_swapcase([text], None)) |
3102 | expected_len = len(post_filtered_content) |
3103 | expected_sha = sha_string(post_filtered_content) |
3104 | - self.assertEqual((expected_len,expected_sha), |
3105 | + self.assertEqual((expected_len, expected_sha), |
3106 | internal_size_sha_file_byname('a', |
3107 | [ContentFilter(_swapcase, _swapcase)])) |
3108 | |
3109 | @@ -142,18 +142,18 @@ |
3110 | z_stack = [ContentFilter('y', 'x'), ContentFilter('w', 'v')] |
3111 | self._register_map('foo', a_stack, z_stack) |
3112 | self._register_map('bar', d_stack, z_stack) |
3113 | - prefs = (('foo','v1'),) |
3114 | + prefs = (('foo', 'v1'),) |
3115 | self.assertEqual(a_stack, _get_filter_stack_for(prefs)) |
3116 | - prefs = (('foo','v2'),) |
3117 | + prefs = (('foo', 'v2'),) |
3118 | self.assertEqual(z_stack, _get_filter_stack_for(prefs)) |
3119 | - prefs = (('foo','v1'), ('bar','v1')) |
3120 | + prefs = (('foo', 'v1'), ('bar', 'v1')) |
3121 | self.assertEqual(a_stack + d_stack, _get_filter_stack_for(prefs)) |
3122 | # Test an unknown preference |
3123 | - prefs = (('baz','v1'),) |
3124 | + prefs = (('baz', 'v1'),) |
3125 | self.assertEqual([], _get_filter_stack_for(prefs)) |
3126 | # Test an unknown value |
3127 | - prefs = (('foo','v3'),) |
3128 | + prefs = (('foo', 'v3'),) |
3129 | self.assertEqual([], _get_filter_stack_for(prefs)) |
3130 | # Test a value of None is skipped |
3131 | - prefs = (('foo',None), ('bar', 'v1')) |
3132 | + prefs = (('foo', None), ('bar', 'v1')) |
3133 | self.assertEqual(d_stack, _get_filter_stack_for(prefs)) |
3134 | |
3135 | === modified file 'breezy/tests/test_foreign.py' |
3136 | --- breezy/tests/test_foreign.py 2017-08-09 23:17:39 +0000 |
3137 | +++ breezy/tests/test_foreign.py 2017-11-12 14:04:35 +0000 |
3138 | @@ -91,7 +91,7 @@ |
3139 | return "%s|%s|%s" % foreign_revid |
3140 | |
3141 | |
3142 | -class DummyForeignVcsBranch(bzrbranch.BzrBranch6,foreign.ForeignBranch): |
3143 | +class DummyForeignVcsBranch(bzrbranch.BzrBranch6, foreign.ForeignBranch): |
3144 | """A Dummy VCS Branch.""" |
3145 | |
3146 | @property |
3147 | |
3148 | === modified file 'breezy/tests/test_generate_ids.py' |
3149 | --- breezy/tests/test_generate_ids.py 2017-05-22 00:56:52 +0000 |
3150 | +++ breezy/tests/test_generate_ids.py 2017-11-12 14:04:35 +0000 |
3151 | @@ -130,7 +130,7 @@ |
3152 | def test_gen_revision_id_email(self): |
3153 | """gen_revision_id uses email address if present""" |
3154 | regex = r'user\+joe_bar@foo-bar\.com-\d{14}-[a-z0-9]{16}' |
3155 | - self.assertGenRevisionId(regex,'user+joe_bar@foo-bar.com') |
3156 | + self.assertGenRevisionId(regex, 'user+joe_bar@foo-bar.com') |
3157 | self.assertGenRevisionId(regex, '<user+joe_bar@foo-bar.com>') |
3158 | self.assertGenRevisionId(regex, 'Joe Bar <user+joe_bar@foo-bar.com>') |
3159 | self.assertGenRevisionId(regex, 'Joe Bar <user+Joe_Bar@Foo-Bar.com>') |
3160 | |
3161 | === modified file 'breezy/tests/test_globbing.py' |
3162 | --- breezy/tests/test_globbing.py 2017-10-27 00:18:42 +0000 |
3163 | +++ breezy/tests/test_globbing.py 2017-11-12 14:04:35 +0000 |
3164 | @@ -307,10 +307,10 @@ |
3165 | patterns = [u'*.%03d' % i for i in range(300)] |
3166 | globster = Globster(patterns) |
3167 | # test the fence posts |
3168 | - for x in (0,98,99,197,198,296,297,299): |
3169 | + for x in (0, 98, 99, 197, 198, 296, 297, 299): |
3170 | filename = u'foo.%03d' % x |
3171 | - self.assertEqual(patterns[x],globster.match(filename)) |
3172 | - self.assertEqual(None,globster.match('foobar.300')) |
3173 | + self.assertEqual(patterns[x], globster.match(filename)) |
3174 | + self.assertEqual(None, globster.match('foobar.300')) |
3175 | |
3176 | def test_bad_pattern(self): |
3177 | """Ensure that globster handles bad patterns cleanly.""" |
3178 | @@ -325,7 +325,7 @@ |
3179 | |
3180 | def test_exclusion_patterns(self): |
3181 | """test that exception patterns are not matched""" |
3182 | - patterns = [ u'*', u'!./local', u'!./local/**/*', u'!RE:\\.z.*',u'!!./.zcompdump' ] |
3183 | + patterns = [ u'*', u'!./local', u'!./local/**/*', u'!RE:\\.z.*', u'!!./.zcompdump' ] |
3184 | globster = ExceptionGlobster(patterns) |
3185 | self.assertEqual(u'*', globster.match('tmp/foo.txt')) |
3186 | self.assertEqual(None, globster.match('local')) |
3187 | |
3188 | === modified file 'breezy/tests/test_graph.py' |
3189 | --- breezy/tests/test_graph.py 2017-06-05 20:48:31 +0000 |
3190 | +++ breezy/tests/test_graph.py 2017-11-12 14:04:35 +0000 |
3191 | @@ -232,11 +232,11 @@ |
3192 | # | | | |
3193 | # |/|/ |
3194 | # t u |
3195 | -complex_shortcut2 = {'a':[NULL_REVISION], 'b':['a'], 'c':['b'], 'd':['c'], |
3196 | - 'e':['d'], 'f':['e'], 'g':['f'], 'h':['d'], 'i':['g'], |
3197 | - 'j':['h'], 'k':['h', 'i'], 'l':['k'], 'm':['l'], 'n':['m'], |
3198 | - 'o':['n'], 'p':['o'], 'q':['p'], 'r':['q'], 's':['r'], |
3199 | - 't':['i', 's'], 'u':['s', 'j'], |
3200 | +complex_shortcut2 = {'a': [NULL_REVISION], 'b': ['a'], 'c': ['b'], 'd': ['c'], |
3201 | + 'e': ['d'], 'f': ['e'], 'g': ['f'], 'h': ['d'], 'i': ['g'], |
3202 | + 'j': ['h'], 'k': ['h', 'i'], 'l': ['k'], 'm': ['l'], 'n': ['m'], |
3203 | + 'o': ['n'], 'p': ['o'], 'q': ['p'], 'r': ['q'], 's': ['r'], |
3204 | + 't': ['i', 's'], 'u': ['s', 'j'], |
3205 | } |
3206 | |
3207 | # Graph where different walkers will race to find the common and uncommon |
3208 | @@ -894,9 +894,9 @@ |
3209 | def test_heads_limits_search(self): |
3210 | # test that a heads query does not search all of history |
3211 | graph_dict = { |
3212 | - 'left':['common'], |
3213 | - 'right':['common'], |
3214 | - 'common':['deeper'], |
3215 | + 'left': ['common'], |
3216 | + 'right': ['common'], |
3217 | + 'common': ['deeper'], |
3218 | } |
3219 | self.assertEqual({'left', 'right'}, |
3220 | self._run_heads_break_deeper(graph_dict, ['left', 'right'])) |
3221 | @@ -904,11 +904,11 @@ |
3222 | def test_heads_limits_search_assymetric(self): |
3223 | # test that a heads query does not search all of history |
3224 | graph_dict = { |
3225 | - 'left':['midleft'], |
3226 | - 'midleft':['common'], |
3227 | - 'right':['common'], |
3228 | - 'common':['aftercommon'], |
3229 | - 'aftercommon':['deeper'], |
3230 | + 'left': ['midleft'], |
3231 | + 'midleft': ['common'], |
3232 | + 'right': ['common'], |
3233 | + 'common': ['aftercommon'], |
3234 | + 'aftercommon': ['deeper'], |
3235 | } |
3236 | self.assertEqual({'left', 'right'}, |
3237 | self._run_heads_break_deeper(graph_dict, ['left', 'right'])) |
3238 | @@ -917,11 +917,11 @@ |
3239 | # test that common nodes are still queried, preventing |
3240 | # all-the-way-to-origin behaviour in the following graph: |
3241 | graph_dict = { |
3242 | - 'h1':['shortcut', 'common1'], |
3243 | - 'h2':['common1'], |
3244 | - 'shortcut':['common2'], |
3245 | - 'common1':['common2'], |
3246 | - 'common2':['deeper'], |
3247 | + 'h1': ['shortcut', 'common1'], |
3248 | + 'h2': ['common1'], |
3249 | + 'shortcut': ['common2'], |
3250 | + 'common1': ['common2'], |
3251 | + 'common2': ['deeper'], |
3252 | } |
3253 | self.assertEqual({'h1', 'h2'}, |
3254 | self._run_heads_break_deeper(graph_dict, ['h1', 'h2'])) |
3255 | @@ -939,9 +939,9 @@ |
3256 | |
3257 | def test_breadth_first_search_deep_ghosts(self): |
3258 | graph = self.make_graph({ |
3259 | - 'head':['present'], |
3260 | - 'present':['child', 'ghost'], |
3261 | - 'child':[], |
3262 | + 'head': ['present'], |
3263 | + 'present': ['child', 'ghost'], |
3264 | + 'child': [], |
3265 | }) |
3266 | # with_ghosts reports the ghosts |
3267 | search = graph._make_breadth_first_searcher(['head']) |
3268 | @@ -962,9 +962,9 @@ |
3269 | # To make the API robust, we allow calling both next() and |
3270 | # next_with_ghosts() on the same searcher. |
3271 | graph = self.make_graph({ |
3272 | - 'head':['present'], |
3273 | - 'present':['child', 'ghost'], |
3274 | - 'child':[], |
3275 | + 'head': ['present'], |
3276 | + 'present': ['child', 'ghost'], |
3277 | + 'child': [], |
3278 | }) |
3279 | # start with next_with_ghosts |
3280 | search = graph._make_breadth_first_searcher(['head']) |
3281 | @@ -984,10 +984,10 @@ |
3282 | def test_breadth_first_change_search(self): |
3283 | # Changing the search should work with both next and next_with_ghosts. |
3284 | graph = self.make_graph({ |
3285 | - 'head':['present'], |
3286 | - 'present':['stopped'], |
3287 | - 'other':['other_2'], |
3288 | - 'other_2':[], |
3289 | + 'head': ['present'], |
3290 | + 'present': ['stopped'], |
3291 | + 'other': ['other_2'], |
3292 | + 'other_2': [], |
3293 | }) |
3294 | search = graph._make_breadth_first_searcher(['head']) |
3295 | self.assertEqual(({'head'}, set()), search.next_with_ghosts()) |
3296 | @@ -1035,9 +1035,9 @@ |
3297 | |
3298 | def test_breadth_first_get_result_excludes_current_pending(self): |
3299 | graph = self.make_graph({ |
3300 | - 'head':['child'], |
3301 | - 'child':[NULL_REVISION], |
3302 | - NULL_REVISION:[], |
3303 | + 'head': ['child'], |
3304 | + 'child': [NULL_REVISION], |
3305 | + NULL_REVISION: [], |
3306 | }) |
3307 | search = graph._make_breadth_first_searcher(['head']) |
3308 | # At the start, nothing has been seen, to its all excluded: |
3309 | @@ -1102,9 +1102,9 @@ |
3310 | # A client should be able to say 'stop node X' even if X has not been |
3311 | # returned to the client. |
3312 | graph = self.make_graph({ |
3313 | - 'head':['child', 'ghost1'], |
3314 | - 'child':[NULL_REVISION], |
3315 | - NULL_REVISION:[], |
3316 | + 'head': ['child', 'ghost1'], |
3317 | + 'child': [NULL_REVISION], |
3318 | + NULL_REVISION: [], |
3319 | }) |
3320 | search = graph._make_breadth_first_searcher(['head']) |
3321 | expected = [ |
3322 | @@ -1128,10 +1128,10 @@ |
3323 | # from the result even if X was seen in an older iteration of the |
3324 | # search. |
3325 | graph = self.make_graph({ |
3326 | - 'head':['middle'], |
3327 | - 'middle':['child'], |
3328 | - 'child':[NULL_REVISION], |
3329 | - NULL_REVISION:[], |
3330 | + 'head': ['middle'], |
3331 | + 'middle': ['child'], |
3332 | + 'child': [NULL_REVISION], |
3333 | + NULL_REVISION: [], |
3334 | }) |
3335 | search = graph._make_breadth_first_searcher(['head']) |
3336 | expected = [ |
3337 | @@ -1152,9 +1152,9 @@ |
3338 | |
3339 | def test_breadth_first_get_result_ghosts_are_excluded(self): |
3340 | graph = self.make_graph({ |
3341 | - 'head':['child', 'ghost'], |
3342 | - 'child':[NULL_REVISION], |
3343 | - NULL_REVISION:[], |
3344 | + 'head': ['child', 'ghost'], |
3345 | + 'child': [NULL_REVISION], |
3346 | + NULL_REVISION: [], |
3347 | }) |
3348 | search = graph._make_breadth_first_searcher(['head']) |
3349 | # using next: |
3350 | @@ -1173,9 +1173,9 @@ |
3351 | |
3352 | def test_breadth_first_get_result_starting_a_ghost_ghost_is_excluded(self): |
3353 | graph = self.make_graph({ |
3354 | - 'head':['child'], |
3355 | - 'child':[NULL_REVISION], |
3356 | - NULL_REVISION:[], |
3357 | + 'head': ['child'], |
3358 | + 'child': [NULL_REVISION], |
3359 | + NULL_REVISION: [], |
3360 | }) |
3361 | search = graph._make_breadth_first_searcher(['head']) |
3362 | # using next: |
3363 | @@ -1194,8 +1194,8 @@ |
3364 | |
3365 | def test_breadth_first_revision_count_includes_NULL_REVISION(self): |
3366 | graph = self.make_graph({ |
3367 | - 'head':[NULL_REVISION], |
3368 | - NULL_REVISION:[], |
3369 | + 'head': [NULL_REVISION], |
3370 | + NULL_REVISION: [], |
3371 | }) |
3372 | search = graph._make_breadth_first_searcher(['head']) |
3373 | # using next: |
3374 | @@ -1215,8 +1215,8 @@ |
3375 | def test_breadth_first_search_get_result_after_StopIteration(self): |
3376 | # StopIteration should not invalid anything.. |
3377 | graph = self.make_graph({ |
3378 | - 'head':[NULL_REVISION], |
3379 | - NULL_REVISION:[], |
3380 | + 'head': [NULL_REVISION], |
3381 | + NULL_REVISION: [], |
3382 | }) |
3383 | search = graph._make_breadth_first_searcher(['head']) |
3384 | # using next: |
3385 | |
3386 | === modified file 'breezy/tests/test_help.py' |
3387 | --- breezy/tests/test_help.py 2017-10-27 00:18:42 +0000 |
3388 | +++ breezy/tests/test_help.py 2017-11-12 14:04:35 +0000 |
3389 | @@ -400,7 +400,7 @@ |
3390 | cmd = cmd_WithSeeAlso() |
3391 | helptext = cmd.get_help_text(['gam']) |
3392 | self.assertEndsWith( |
3393 | - helptext,'''\ |
3394 | + helptext, '''\ |
3395 | -q, --quiet zz{{Only display errors and warnings.}} |
3396 | -v, --verbose zz{{Display more information.}} |
3397 | -h, --help zz{{Show help message.}} |
3398 | |
3399 | === modified file 'breezy/tests/test_http.py' |
3400 | --- breezy/tests/test_http.py 2017-10-26 11:10:38 +0000 |
3401 | +++ breezy/tests/test_http.py 2017-11-12 14:04:35 +0000 |
3402 | @@ -286,7 +286,7 @@ |
3403 | self.req_handler._parse_ranges(header, file_size)) |
3404 | |
3405 | def test_simple_range(self): |
3406 | - self.assertRanges([(0,2)], 'bytes=0-2', 12) |
3407 | + self.assertRanges([(0, 2)], 'bytes=0-2', 12) |
3408 | |
3409 | def test_tail(self): |
3410 | self.assertRanges([(8, 11)], 'bytes=-4', 12) |
3411 | @@ -513,8 +513,8 @@ |
3412 | self.assertEqual(value, range_header(coalesced, tail)) |
3413 | |
3414 | def test_range_header_single(self): |
3415 | - self.check_header('0-9', ranges=[(0,9)]) |
3416 | - self.check_header('100-109', ranges=[(100,109)]) |
3417 | + self.check_header('0-9', ranges=[(0, 9)]) |
3418 | + self.check_header('100-109', ranges=[(100, 109)]) |
3419 | |
3420 | def test_range_header_tail(self): |
3421 | self.check_header('-10', tail=10) |
3422 | @@ -522,11 +522,11 @@ |
3423 | |
3424 | def test_range_header_multi(self): |
3425 | self.check_header('0-9,100-200,300-5000', |
3426 | - ranges=[(0,9), (100, 200), (300,5000)]) |
3427 | + ranges=[(0, 9), (100, 200), (300, 5000)]) |
3428 | |
3429 | def test_range_header_mixed(self): |
3430 | self.check_header('0-9,300-5000,-50', |
3431 | - ranges=[(0,9), (300,5000)], |
3432 | + ranges=[(0, 9), (300, 5000)], |
3433 | tail=50) |
3434 | |
3435 | |
3436 | @@ -759,12 +759,12 @@ |
3437 | # This is intentionally reading off the end of the file |
3438 | # since we are sure that it cannot get there |
3439 | self.assertListRaises((errors.InvalidRange, errors.ShortReadvError,), |
3440 | - t.readv, 'a', [(1,1), (8,10)]) |
3441 | + t.readv, 'a', [(1, 1), (8, 10)]) |
3442 | |
3443 | # This is trying to seek past the end of the file, it should |
3444 | # also raise a special error |
3445 | self.assertListRaises((errors.InvalidRange, errors.ShortReadvError,), |
3446 | - t.readv, 'a', [(12,2)]) |
3447 | + t.readv, 'a', [(12, 2)]) |
3448 | |
3449 | def test_readv_multiple_get_requests(self): |
3450 | server = self.get_readonly_server() |
3451 | @@ -885,7 +885,7 @@ |
3452 | self.send_header('Accept-Ranges', 'bytes') |
3453 | # XXX: this is strange; the 'random' name below seems undefined and |
3454 | # yet the tests pass -- mbp 2010-10-11 bug 658773 |
3455 | - boundary = "%d" % random.randint(0,0x7FFFFFFF) |
3456 | + boundary = "%d" % random.randint(0, 0x7FFFFFFF) |
3457 | self.send_header("Content-Type", |
3458 | "multipart/byteranges; boundary=%s" % boundary) |
3459 | self.end_headers() |
3460 | @@ -1271,7 +1271,7 @@ |
3461 | coalesce = t._coalesce_offsets |
3462 | coalesced = list(coalesce(offsets, limit=0, fudge_factor=0)) |
3463 | code, data = t._get(relpath, coalesced) |
3464 | - self.assertTrue(code in (200, 206),'_get returns: %d' % code) |
3465 | + self.assertTrue(code in (200, 206), '_get returns: %d' % code) |
3466 | for start, end in ranges: |
3467 | data.seek(start) |
3468 | yield data.read(end - start + 1) |
3469 | @@ -1279,14 +1279,14 @@ |
3470 | def _file_tail(self, relpath, tail_amount): |
3471 | t = self.get_readonly_transport() |
3472 | code, data = t._get(relpath, [], tail_amount) |
3473 | - self.assertTrue(code in (200, 206),'_get returns: %d' % code) |
3474 | + self.assertTrue(code in (200, 206), '_get returns: %d' % code) |
3475 | data.seek(-tail_amount, 2) |
3476 | return data.read(tail_amount) |
3477 | |
3478 | def test_range_header(self): |
3479 | # Valid ranges |
3480 | self.assertEqual( |
3481 | - ['0', '234'], list(self._file_contents('a', [(0,0), (2,4)]))) |
3482 | + ['0', '234'], list(self._file_contents('a', [(0, 0), (2, 4)]))) |
3483 | |
3484 | def test_range_header_tail(self): |
3485 | self.assertEqual('789', self._file_tail('a', 3)) |
3486 | @@ -1380,7 +1380,7 @@ |
3487 | super(TestHTTPSilentRedirections, self).setUp() |
3488 | install_redirected_request(self) |
3489 | cleanup_http_redirection_connections(self) |
3490 | - self.build_tree_contents([('a','a'), |
3491 | + self.build_tree_contents([('a', 'a'), |
3492 | ('1/',), |
3493 | ('1/a', 'redirected once'), |
3494 | ('2/',), |
3495 | @@ -1579,7 +1579,7 @@ |
3496 | t = self.get_user_transport(None, None) |
3497 | ui.ui_factory = tests.TestUIFactory(stdin='joe\nfoo\n') |
3498 | stdout, stderr = ui.ui_factory.stdout, ui.ui_factory.stderr |
3499 | - self.assertEqual('contents of a\n',t.get('a').read()) |
3500 | + self.assertEqual('contents of a\n', t.get('a').read()) |
3501 | # stdin should be empty |
3502 | self.assertEqual('', ui.ui_factory.stdin.readline()) |
3503 | stderr.seek(0) |
3504 | @@ -1602,10 +1602,10 @@ |
3505 | self.assertEqual('', stdout.getvalue()) |
3506 | # And we shouldn't prompt again for a different request |
3507 | # against the same transport. |
3508 | - self.assertEqual('contents of b\n',t.get('b').read()) |
3509 | + self.assertEqual('contents of b\n', t.get('b').read()) |
3510 | t2 = t.clone() |
3511 | # And neither against a clone |
3512 | - self.assertEqual('contents of b\n',t2.get('b').read()) |
3513 | + self.assertEqual('contents of b\n', t2.get('b').read()) |
3514 | # Only one 'Authentication Required' error should occur |
3515 | self.assertEqual(1, self.server.auth_required_errors) |
3516 | |
3517 | @@ -1634,7 +1634,7 @@ |
3518 | _setup_authentication_config(scheme='http', port=self.server.port, |
3519 | user=user, password=password) |
3520 | # Issue a request to the server to connect |
3521 | - self.assertEqual('contents of a\n',t.get('a').read()) |
3522 | + self.assertEqual('contents of a\n', t.get('a').read()) |
3523 | # stdin should have been left untouched |
3524 | self.assertEqual(stdin_content, ui.ui_factory.stdin.readline()) |
3525 | # Only one 'Authentication Required' error should occur |
3526 | @@ -1792,7 +1792,7 @@ |
3527 | remote_transport = remote.RemoteTransport('bzr://fake_host/', |
3528 | medium=medium) |
3529 | self.assertEqual( |
3530 | - [(0, "c")], list(remote_transport.readv("data-file", [(0,1)]))) |
3531 | + [(0, "c")], list(remote_transport.readv("data-file", [(0, 1)]))) |
3532 | |
3533 | def test_http_send_smart_request(self): |
3534 | |
3535 | @@ -2163,7 +2163,7 @@ |
3536 | |
3537 | def setUp(self): |
3538 | super(TestAuthOnRedirected, self).setUp() |
3539 | - self.build_tree_contents([('a','a'), |
3540 | + self.build_tree_contents([('a', 'a'), |
3541 | ('1/',), |
3542 | ('1/a', 'redirected once'), |
3543 | ],) |
3544 | |
3545 | === modified file 'breezy/tests/test_https_ca_bundle.py' |
3546 | --- breezy/tests/test_https_ca_bundle.py 2017-05-22 00:56:52 +0000 |
3547 | +++ breezy/tests/test_https_ca_bundle.py 2017-11-12 14:04:35 +0000 |
3548 | @@ -35,7 +35,7 @@ |
3549 | |
3550 | def _make_file(self, in_dir='.'): |
3551 | fname = os.path.join(in_dir, 'curl-ca-bundle.crt') |
3552 | - f = file(fname,'w') |
3553 | + f = file(fname, 'w') |
3554 | f.write('spam') |
3555 | f.close() |
3556 | |
3557 | |
3558 | === modified file 'breezy/tests/test_index.py' |
3559 | --- breezy/tests/test_index.py 2017-07-30 23:53:38 +0000 |
3560 | +++ breezy/tests/test_index.py 2017-11-12 14:04:35 +0000 |
3561 | @@ -823,7 +823,7 @@ |
3562 | index = self.make_index(1, nodes=[ |
3563 | (('name', ), 'data', ([('ref', ), ('ref', )], )), |
3564 | (('ref', ), 'refdata', ([], ))]) |
3565 | - self.assertEqual({(index, ('name', ), 'data', ((('ref',),('ref',)),)), |
3566 | + self.assertEqual({(index, ('name', ), 'data', ((('ref',), ('ref',)),)), |
3567 | (index, ('ref', ), 'refdata', ((), ))}, |
3568 | set(index.iter_entries([('name',), ('ref',)]))) |
3569 | |
3570 | |
3571 | === modified file 'breezy/tests/test_knit.py' |
3572 | --- breezy/tests/test_knit.py 2017-07-30 18:50:21 +0000 |
3573 | +++ breezy/tests/test_knit.py 2017-11-12 14:04:35 +0000 |
3574 | @@ -1212,9 +1212,9 @@ |
3575 | index = self.get_knit_index(transport, "filename", "r") |
3576 | |
3577 | self.assertEqual({ |
3578 | - ("a",):(), |
3579 | - ("b",):(("a",), ("c",)), |
3580 | - ("c",):(("b",), ("a",), ("e",)), |
3581 | + ("a",): (), |
3582 | + ("b",): (("a",), ("c",)), |
3583 | + ("c",): (("b",), ("a",), ("e",)), |
3584 | }, index.get_parent_map(index.keys())) |
3585 | |
3586 | def test_impossible_parent(self): |
3587 | @@ -1421,7 +1421,7 @@ |
3588 | details = ('line-delta', False) |
3589 | p1_record = ['line1\n', 'line2\n'] |
3590 | ann._num_compression_children[p1_key] = 1 |
3591 | - res = ann._expand_record(rev_key, (p1_key,p2_key), p1_key, |
3592 | + res = ann._expand_record(rev_key, (p1_key, p2_key), p1_key, |
3593 | record, details) |
3594 | self.assertEqual(None, res) |
3595 | # self.assertTrue(p1_key in ann._pending_deltas) |
3596 | @@ -1543,9 +1543,9 @@ |
3597 | ('a-2',): ((('a-2',), 0, 0), None, (('a-1',),), ('fulltext', False)), |
3598 | ('a-3',): ((('a-3',), 0, 0), None, (('a-2',),), ('fulltext', False)), |
3599 | }, idx.get_build_details(idx.keys())) |
3600 | - self.assertEqual({('a-1',):(), |
3601 | - ('a-2',):(('a-1',),), |
3602 | - ('a-3',):(('a-2',),),}, |
3603 | + self.assertEqual({('a-1',): (), |
3604 | + ('a-2',): (('a-1',),), |
3605 | + ('a-3',): (('a-2',),),}, |
3606 | idx.get_parent_map(idx.keys())) |
3607 | |
3608 | def test_add_versions_fails_clean(self): |
3609 | |
3610 | === modified file 'breezy/tests/test_lazy_import.py' |
3611 | --- breezy/tests/test_lazy_import.py 2017-08-26 15:35:30 +0000 |
3612 | +++ breezy/tests/test_lazy_import.py 2017-11-12 14:04:35 +0000 |
3613 | @@ -293,8 +293,8 @@ |
3614 | val = test_func1(1, 2, c='3') |
3615 | self.assertIs(test_func1, func) |
3616 | |
3617 | - self.assertEqual((1,2,'3'), val) |
3618 | - self.assertEqual([('__call__', (1,2), {'c':'3'}), |
3619 | + self.assertEqual((1, 2, '3'), val) |
3620 | + self.assertEqual([('__call__', (1, 2), {'c':'3'}), |
3621 | 'factory', |
3622 | 'func', |
3623 | ], actions) |
3624 | @@ -715,8 +715,8 @@ |
3625 | |
3626 | InstrumentedImportReplacer(scope=globals(), |
3627 | name='root5', module_path=[self.root_name], member=None, |
3628 | - children={'mod5':([self.root_name, self.mod_name], None, {}), |
3629 | - 'sub5':([self.root_name, self.sub_name], None, |
3630 | + children={'mod5': ([self.root_name, self.mod_name], None, {}), |
3631 | + 'sub5': ([self.root_name, self.sub_name], None, |
3632 | {'submoda5':([self.root_name, self.sub_name, |
3633 | self.submoda_name], None, {}), |
3634 | 'submodb5':([self.root_name, self.sub_name, |
3635 | @@ -784,12 +784,12 @@ |
3636 | proc.imports)) |
3637 | |
3638 | def test_import_one(self): |
3639 | - self.check({'one':(['one'], None, {}), |
3640 | + self.check({'one': (['one'], None, {}), |
3641 | }, ['import one']) |
3642 | |
3643 | def test_import_one_two(self): |
3644 | - one_two_map = {'one':(['one'], None, |
3645 | - {'two':(['one', 'two'], None, {}), |
3646 | + one_two_map = {'one': (['one'], None, |
3647 | + {'two': (['one', 'two'], None, {}), |
3648 | }), |
3649 | } |
3650 | self.check(one_two_map, ['import one.two']) |
3651 | @@ -799,9 +799,9 @@ |
3652 | |
3653 | def test_import_one_two_three(self): |
3654 | one_two_three_map = { |
3655 | - 'one':(['one'], None, |
3656 | - {'two':(['one', 'two'], None, |
3657 | - {'three':(['one', 'two', 'three'], None, {}), |
3658 | + 'one': (['one'], None, |
3659 | + {'two': (['one', 'two'], None, |
3660 | + {'three': (['one', 'two', 'three'], None, {}), |
3661 | }), |
3662 | }), |
3663 | } |
3664 | @@ -813,17 +813,17 @@ |
3665 | 'import one']) |
3666 | |
3667 | def test_import_one_as_x(self): |
3668 | - self.check({'x':(['one'], None, {}), |
3669 | + self.check({'x': (['one'], None, {}), |
3670 | }, ['import one as x']) |
3671 | |
3672 | def test_import_one_two_as_x(self): |
3673 | - self.check({'x':(['one', 'two'], None, {}), |
3674 | + self.check({'x': (['one', 'two'], None, {}), |
3675 | }, ['import one.two as x']) |
3676 | |
3677 | def test_import_mixed(self): |
3678 | - mixed = {'x':(['one', 'two'], None, {}), |
3679 | - 'one':(['one'], None, |
3680 | - {'two':(['one', 'two'], None, {}), |
3681 | + mixed = {'x': (['one', 'two'], None, {}), |
3682 | + 'one': (['one'], None, |
3683 | + {'two': (['one', 'two'], None, {}), |
3684 | }), |
3685 | } |
3686 | self.check(mixed, ['import one.two as x, one.two']) |
3687 | @@ -854,8 +854,8 @@ |
3688 | ['from one import two as three']) |
3689 | |
3690 | def test_from_one_import_two_three(self): |
3691 | - two_three_map = {'two':(['one'], 'two', {}), |
3692 | - 'three':(['one'], 'three', {}), |
3693 | + two_three_map = {'two': (['one'], 'two', {}), |
3694 | + 'three': (['one'], 'three', {}), |
3695 | } |
3696 | self.check_result(two_three_map, |
3697 | ['from one import two, three']) |
3698 | @@ -938,8 +938,8 @@ |
3699 | self.check(exp, '\nimport one\n') |
3700 | |
3701 | def test_import_one_two(self): |
3702 | - exp = {'one':(['one'], None, |
3703 | - {'two':(['one', 'two'], None, {}), |
3704 | + exp = {'one': (['one'], None, |
3705 | + {'two': (['one', 'two'], None, {}), |
3706 | }), |
3707 | } |
3708 | self.check(exp, 'import one.two') |
3709 | @@ -951,13 +951,13 @@ |
3710 | self.check(exp, 'import one as two') |
3711 | |
3712 | def test_import_many(self): |
3713 | - exp = {'one':(['one'], None, |
3714 | - {'two':(['one', 'two'], None, |
3715 | - {'three':(['one', 'two', 'three'], None, {}), |
3716 | + exp = {'one': (['one'], None, |
3717 | + {'two': (['one', 'two'], None, |
3718 | + {'three': (['one', 'two', 'three'], None, {}), |
3719 | }), |
3720 | - 'four':(['one', 'four'], None, {}), |
3721 | + 'four': (['one', 'four'], None, {}), |
3722 | }), |
3723 | - 'five':(['one', 'five'], None, {}), |
3724 | + 'five': (['one', 'five'], None, {}), |
3725 | } |
3726 | self.check(exp, 'import one.two.three, one.four, one.five as five') |
3727 | self.check(exp, 'import one.five as five\n' |
3728 | @@ -983,9 +983,9 @@ |
3729 | ' )\n') |
3730 | |
3731 | def test_from_many(self): |
3732 | - exp = {'two':(['one'], 'two', {}), |
3733 | - 'three':(['one', 'two'], 'three', {}), |
3734 | - 'five':(['one', 'two'], 'four', {}), |
3735 | + exp = {'two': (['one'], 'two', {}), |
3736 | + 'three': (['one', 'two'], 'three', {}), |
3737 | + 'five': (['one', 'two'], 'four', {}), |
3738 | } |
3739 | self.check(exp, 'from one import two\n' |
3740 | 'from one.two import three, four as five\n') |
3741 | @@ -996,11 +996,11 @@ |
3742 | ' )\n') |
3743 | |
3744 | def test_mixed(self): |
3745 | - exp = {'two':(['one'], 'two', {}), |
3746 | - 'three':(['one', 'two'], 'three', {}), |
3747 | - 'five':(['one', 'two'], 'four', {}), |
3748 | - 'one':(['one'], None, |
3749 | - {'two':(['one', 'two'], None, {}), |
3750 | + exp = {'two': (['one'], 'two', {}), |
3751 | + 'three': (['one', 'two'], 'three', {}), |
3752 | + 'five': (['one', 'two'], 'four', {}), |
3753 | + 'one': (['one'], None, |
3754 | + {'two': (['one', 'two'], None, {}), |
3755 | }), |
3756 | } |
3757 | self.check(exp, 'from one import two\n' |
3758 | |
3759 | === modified file 'breezy/tests/test_log.py' |
3760 | --- breezy/tests/test_log.py 2017-08-27 20:37:36 +0000 |
3761 | +++ breezy/tests/test_log.py 2017-11-12 14:04:35 +0000 |
3762 | @@ -410,7 +410,7 @@ |
3763 | def test_show_ids(self): |
3764 | wt = self.make_branch_and_tree('parent') |
3765 | self.build_tree(['parent/f1', 'parent/f2']) |
3766 | - wt.add(['f1','f2']) |
3767 | + wt.add(['f1', 'f2']) |
3768 | self.wt_commit(wt, 'first post', rev_id='a') |
3769 | child_wt = wt.controldir.sprout('child').open_workingtree() |
3770 | self.wt_commit(child_wt, 'branch 1 changes', rev_id='b') |
3771 | @@ -431,7 +431,7 @@ |
3772 | |
3773 | """, |
3774 | wt.branch, log.ShortLogFormatter, |
3775 | - formatter_kwargs=dict(levels=0,show_ids=True)) |
3776 | + formatter_kwargs=dict(levels=0, show_ids=True)) |
3777 | |
3778 | |
3779 | class TestShortLogFormatterWithMergeRevisions(TestCaseForLogFormatter): |
3780 | @@ -546,7 +546,7 @@ |
3781 | def test_verbose_merge_revisions_contain_deltas(self): |
3782 | wt = self.make_branch_and_tree('parent') |
3783 | self.build_tree(['parent/f1', 'parent/f2']) |
3784 | - wt.add(['f1','f2']) |
3785 | + wt.add(['f1', 'f2']) |
3786 | self.wt_commit(wt, 'first post') |
3787 | child_wt = wt.controldir.sprout('child').open_workingtree() |
3788 | os.unlink('child/f1') |
3789 | @@ -724,7 +724,7 @@ |
3790 | def test_show_ids(self): |
3791 | wt = self.make_branch_and_tree('parent') |
3792 | self.build_tree(['parent/f1', 'parent/f2']) |
3793 | - wt.add(['f1','f2']) |
3794 | + wt.add(['f1', 'f2']) |
3795 | self.wt_commit(wt, 'first post', rev_id='a') |
3796 | child_wt = wt.controldir.sprout('child').open_workingtree() |
3797 | self.wt_commit(child_wt, 'branch 1 changes', rev_id='b') |
3798 | @@ -760,7 +760,7 @@ |
3799 | first post |
3800 | """, |
3801 | wt.branch, log.LongLogFormatter, |
3802 | - formatter_kwargs=dict(levels=0,show_ids=True)) |
3803 | + formatter_kwargs=dict(levels=0, show_ids=True)) |
3804 | |
3805 | |
3806 | class TestLongLogFormatterWithoutMergeRevisions(TestCaseForLogFormatter): |
3807 | @@ -789,7 +789,7 @@ |
3808 | def test_long_verbose_contain_deltas(self): |
3809 | wt = self.make_branch_and_tree('parent') |
3810 | self.build_tree(['parent/f1', 'parent/f2']) |
3811 | - wt.add(['f1','f2']) |
3812 | + wt.add(['f1', 'f2']) |
3813 | self.wt_commit(wt, 'first post') |
3814 | child_wt = wt.controldir.sprout('child').open_workingtree() |
3815 | os.unlink('child/f1') |
3816 | |
3817 | === modified file 'breezy/tests/test_merge3.py' |
3818 | --- breezy/tests/test_merge3.py 2017-09-26 00:55:04 +0000 |
3819 | +++ breezy/tests/test_merge3.py 2017-11-12 14:04:35 +0000 |
3820 | @@ -110,7 +110,7 @@ |
3821 | [(0, 2, |
3822 | 0, 2, |
3823 | 0, 2), |
3824 | - (2,2, 2,2, 2,2)]) |
3825 | + (2, 2, 2, 2, 2, 2)]) |
3826 | |
3827 | self.assertEqual(list(m3.merge_regions()), |
3828 | [('unchanged', 0, 2)]) |
3829 | @@ -126,8 +126,8 @@ |
3830 | # todo: should use a sentinal at end as from get_matching_blocks |
3831 | # to match without zz |
3832 | self.assertEqual(list(m3.find_sync_regions()), |
3833 | - [(0,1, 2,3, 0,1), |
3834 | - (1,1, 3,3, 1,1),]) |
3835 | + [(0, 1, 2, 3, 0, 1), |
3836 | + (1, 1, 3, 3, 1, 1),]) |
3837 | |
3838 | self.assertEqual(list(m3.merge_regions()), |
3839 | [('a', 0, 2), |
3840 | @@ -144,7 +144,7 @@ |
3841 | # todo: should use a sentinal at end as from get_matching_blocks |
3842 | # to match without zz |
3843 | self.assertEqual(list(m3.find_sync_regions()), |
3844 | - [(0,0, 2,2, 0,0)]) |
3845 | + [(0, 0, 2, 2, 0, 0)]) |
3846 | |
3847 | self.assertEqual(list(m3.merge_regions()), |
3848 | [('a', 0, 2)]) |
3849 | @@ -162,9 +162,9 @@ |
3850 | [(0, 1), (1, 2)]) |
3851 | |
3852 | self.assertEqual(list(m3.find_sync_regions()), |
3853 | - [(0,1, 0,1, 0,1), |
3854 | - (1,2, 2,3, 1,2), |
3855 | - (2,2, 3,3, 2,2),]) |
3856 | + [(0, 1, 0, 1, 0, 1), |
3857 | + (1, 2, 2, 3, 1, 2), |
3858 | + (2, 2, 3, 3, 2, 2),]) |
3859 | |
3860 | self.assertEqual(list(m3.merge_regions()), |
3861 | [('unchanged', 0, 1), |
3862 | @@ -239,14 +239,14 @@ |
3863 | [(0, 1), (1, 2)]) |
3864 | |
3865 | self.assertEqual(list(m3.find_sync_regions()), |
3866 | - [(0,1, 0,1, 0,1), |
3867 | - (1,2, 2,3, 2,3), |
3868 | - (2,2, 3,3, 3,3),]) |
3869 | + [(0, 1, 0, 1, 0, 1), |
3870 | + (1, 2, 2, 3, 2, 3), |
3871 | + (2, 2, 3, 3, 3, 3),]) |
3872 | |
3873 | self.assertEqual(list(m3.merge_regions()), |
3874 | - [('unchanged', 0,1), |
3875 | - ('conflict', 1,1, 1,2, 1,2), |
3876 | - ('unchanged', 1,2)]) |
3877 | + [('unchanged', 0, 1), |
3878 | + ('conflict', 1, 1, 1, 2, 1, 2), |
3879 | + ('unchanged', 1, 2)]) |
3880 | |
3881 | self.assertEqual(list(m3.merge_groups()), |
3882 | [('unchanged', ['aaa\n']), |
3883 | @@ -279,9 +279,9 @@ |
3884 | [(0, 1), (2, 3)]) |
3885 | |
3886 | self.assertEqual(list(m3.find_sync_regions()), |
3887 | - [(0,1, 0,1, 0,1), |
3888 | - (2,3, 2,3, 2,3), |
3889 | - (3,3, 3,3, 3,3),]) |
3890 | + [(0, 1, 0, 1, 0, 1), |
3891 | + (2, 3, 2, 3, 2, 3), |
3892 | + (3, 3, 3, 3, 3, 3),]) |
3893 | |
3894 | def test_replace_multi(self): |
3895 | """Replacement with regions of different size.""" |
3896 | @@ -294,9 +294,9 @@ |
3897 | |
3898 | |
3899 | self.assertEqual(list(m3.find_sync_regions()), |
3900 | - [(0,1, 0,1, 0,1), |
3901 | - (3,4, 4,5, 5,6), |
3902 | - (4,4, 5,5, 6,6),]) |
3903 | + [(0, 1, 0, 1, 0, 1), |
3904 | + (3, 4, 4, 5, 5, 6), |
3905 | + (4, 4, 5, 5, 6, 6),]) |
3906 | |
3907 | def test_merge_poem(self): |
3908 | """Test case from diff3 manual""" |
3909 | @@ -439,9 +439,9 @@ |
3910 | merge_groups and merge_regions work with non-str input. Methods that |
3911 | return lines like merge_lines fail. |
3912 | """ |
3913 | - base = [(x,x) for x in 'abcde'] |
3914 | - a = [(x,x) for x in 'abcdef'] |
3915 | - b = [(x,x) for x in 'Zabcde'] |
3916 | + base = [(x, x) for x in 'abcde'] |
3917 | + a = [(x, x) for x in 'abcdef'] |
3918 | + b = [(x, x) for x in 'Zabcde'] |
3919 | m3 = merge3.Merge3(base, a, b, allow_objects=True) |
3920 | self.assertEqual( |
3921 | [('b', 0, 1), |
3922 | @@ -450,7 +450,7 @@ |
3923 | list(m3.merge_regions())) |
3924 | self.assertEqual( |
3925 | [('b', [('Z', 'Z')]), |
3926 | - ('unchanged', [(x,x) for x in 'abcde']), |
3927 | + ('unchanged', [(x, x) for x in 'abcde']), |
3928 | ('a', [('f', 'f')])], |
3929 | list(m3.merge_groups())) |
3930 | |
3931 | |
3932 | === modified file 'breezy/tests/test_merge_core.py' |
3933 | --- breezy/tests/test_merge_core.py 2017-06-24 16:32:30 +0000 |
3934 | +++ breezy/tests/test_merge_core.py 2017-11-12 14:04:35 +0000 |
3935 | @@ -607,24 +607,24 @@ |
3936 | |
3937 | def test_merge_swapping_renames(self): |
3938 | a_wt = self.make_branch_and_tree('a') |
3939 | - with file('a/un','wb') as f: f.write('UN') |
3940 | - with file('a/deux','wb') as f: f.write('DEUX') |
3941 | + with file('a/un', 'wb') as f: f.write('UN') |
3942 | + with file('a/deux', 'wb') as f: f.write('DEUX') |
3943 | a_wt.add('un', 'un-id') |
3944 | a_wt.add('deux', 'deux-id') |
3945 | a_wt.commit('r0', rev_id='r0') |
3946 | self.run_bzr('branch a b') |
3947 | b_wt = WorkingTree.open('b') |
3948 | - b_wt.rename_one('un','tmp') |
3949 | - b_wt.rename_one('deux','un') |
3950 | - b_wt.rename_one('tmp','deux') |
3951 | + b_wt.rename_one('un', 'tmp') |
3952 | + b_wt.rename_one('deux', 'un') |
3953 | + b_wt.rename_one('tmp', 'deux') |
3954 | b_wt.commit('r1', rev_id='r1') |
3955 | self.assertEqual(0, a_wt.merge_from_branch(b_wt.branch, |
3956 | b_wt.branch.last_revision(), b_wt.branch.get_rev_id(1))) |
3957 | self.assertPathExists('a/un') |
3958 | self.assertTrue('a/deux') |
3959 | self.assertFalse(os.path.exists('a/tmp')) |
3960 | - self.assertEqual(file('a/un').read(),'DEUX') |
3961 | - self.assertEqual(file('a/deux').read(),'UN') |
3962 | + self.assertEqual(file('a/un').read(), 'DEUX') |
3963 | + self.assertEqual(file('a/deux').read(), 'UN') |
3964 | |
3965 | def test_merge_delete_and_add_same(self): |
3966 | a_wt = self.make_branch_and_tree('a') |
3967 | @@ -641,7 +641,7 @@ |
3968 | a_wt.merge_from_branch(b_wt.branch, b_wt.branch.last_revision(), |
3969 | b_wt.branch.get_rev_id(1)) |
3970 | self.assertTrue(os.path.exists('a/file')) |
3971 | - self.assertEqual(file('a/file').read(),'THAT') |
3972 | + self.assertEqual(file('a/file').read(), 'THAT') |
3973 | |
3974 | def test_merge_rename_before_create(self): |
3975 | """rename before create |
3976 | |
3977 | === modified file 'breezy/tests/test_missing.py' |
3978 | --- breezy/tests/test_missing.py 2017-06-24 16:32:30 +0000 |
3979 | +++ breezy/tests/test_missing.py 2017-11-12 14:04:35 +0000 |
3980 | @@ -95,7 +95,7 @@ |
3981 | verbose=True)) |
3982 | self.assertEqual(4, len(results)) |
3983 | |
3984 | - r0,r1,r2,r3 = results |
3985 | + r0, r1, r2, r3 = results |
3986 | |
3987 | self.assertEqual([('2', 'c-2'), ('3', 'c-3'), |
3988 | ('4', 'c-4'), ('5', 'c-5'),], |
3989 | |
3990 | === modified file 'breezy/tests/test_msgeditor.py' |
3991 | --- breezy/tests/test_msgeditor.py 2017-07-23 18:56:16 +0000 |
3992 | +++ breezy/tests/test_msgeditor.py 2017-11-12 14:04:35 +0000 |
3993 | @@ -295,7 +295,7 @@ |
3994 | # check that commit template written properly |
3995 | # and has platform native line-endings (CRLF on win32) |
3996 | create_file = msgeditor._create_temp_file_with_commit_template |
3997 | - msgfilename, hasinfo = create_file('infotext','----','start message') |
3998 | + msgfilename, hasinfo = create_file('infotext', '----', 'start message') |
3999 | self.assertNotEqual(None, msgfilename) |
4000 | self.assertTrue(hasinfo) |
4001 | expected = os.linesep.join(['start message', |
4002 | |
4003 | === modified file 'breezy/tests/test_options.py' |
4004 | --- breezy/tests/test_options.py 2017-07-14 21:15:49 +0000 |
4005 | +++ breezy/tests/test_options.py 2017-11-12 14:04:35 +0000 |
4006 | @@ -167,7 +167,7 @@ |
4007 | |
4008 | def test_lazy_registry(self): |
4009 | options = [option.RegistryOption('format', '', |
4010 | - lazy_registry=('breezy.controldir','format_registry'), |
4011 | + lazy_registry=('breezy.controldir', 'format_registry'), |
4012 | converter=str)] |
4013 | opts, args = self.parse(options, ['--format', 'knit']) |
4014 | self.assertEqual({'format': 'knit'}, opts) |
4015 | @@ -239,14 +239,14 @@ |
4016 | "Test booleans get True and False passed correctly to a callback.""" |
4017 | cb_calls = [] |
4018 | def cb(option, name, value, parser): |
4019 | - cb_calls.append((option,name,value,parser)) |
4020 | + cb_calls.append((option, name, value, parser)) |
4021 | options = [option.Option('hello', custom_callback=cb)] |
4022 | opts, args = self.parse(options, ['--hello', '--no-hello']) |
4023 | self.assertEqual(2, len(cb_calls)) |
4024 | - opt,name,value,parser = cb_calls[0] |
4025 | + opt, name, value, parser = cb_calls[0] |
4026 | self.assertEqual('hello', name) |
4027 | self.assertTrue(value) |
4028 | - opt,name,value,parser = cb_calls[1] |
4029 | + opt, name, value, parser = cb_calls[1] |
4030 | self.assertEqual('hello', name) |
4031 | self.assertFalse(value) |
4032 | |
4033 | @@ -254,15 +254,15 @@ |
4034 | """Test callbacks work for string options both long and short.""" |
4035 | cb_calls = [] |
4036 | def cb(option, name, value, parser): |
4037 | - cb_calls.append((option,name,value,parser)) |
4038 | + cb_calls.append((option, name, value, parser)) |
4039 | options = [option.Option('hello', type=str, custom_callback=cb, |
4040 | short_name='h')] |
4041 | opts, args = self.parse(options, ['--hello', 'world', '-h', 'mars']) |
4042 | self.assertEqual(2, len(cb_calls)) |
4043 | - opt,name,value,parser = cb_calls[0] |
4044 | + opt, name, value, parser = cb_calls[0] |
4045 | self.assertEqual('hello', name) |
4046 | self.assertEqual('world', value) |
4047 | - opt,name,value,parser = cb_calls[1] |
4048 | + opt, name, value, parser = cb_calls[1] |
4049 | self.assertEqual('hello', name) |
4050 | self.assertEqual('mars', value) |
4051 | |
4052 | @@ -313,18 +313,18 @@ |
4053 | cb_calls = [] |
4054 | def cb(option, name, value, parser): |
4055 | # Note that the value is a reference so copy to keep it |
4056 | - cb_calls.append((option,name,value[:],parser)) |
4057 | + cb_calls.append((option, name, value[:], parser)) |
4058 | options = [option.ListOption('hello', type=str, custom_callback=cb)] |
4059 | opts, args = self.parse(options, ['--hello=world', '--hello=mars', |
4060 | '--hello=-']) |
4061 | self.assertEqual(3, len(cb_calls)) |
4062 | - opt,name,value,parser = cb_calls[0] |
4063 | + opt, name, value, parser = cb_calls[0] |
4064 | self.assertEqual('hello', name) |
4065 | self.assertEqual(['world'], value) |
4066 | - opt,name,value,parser = cb_calls[1] |
4067 | + opt, name, value, parser = cb_calls[1] |
4068 | self.assertEqual('hello', name) |
4069 | self.assertEqual(['world', 'mars'], value) |
4070 | - opt,name,value,parser = cb_calls[2] |
4071 | + opt, name, value, parser = cb_calls[2] |
4072 | self.assertEqual('hello', name) |
4073 | self.assertEqual([], value) |
4074 | |
4075 | |
4076 | === modified file 'breezy/tests/test_osutils.py' |
4077 | --- breezy/tests/test_osutils.py 2017-10-27 00:18:42 +0000 |
4078 | +++ breezy/tests/test_osutils.py 2017-11-12 14:04:35 +0000 |
4079 | @@ -1668,9 +1668,9 @@ |
4080 | processed_files.append(('d', from_path, to_path)) |
4081 | def link_handler(from_path, to_path): |
4082 | processed_links.append((from_path, to_path)) |
4083 | - handlers = {'file':file_handler, |
4084 | - 'directory':dir_handler, |
4085 | - 'symlink':link_handler, |
4086 | + handlers = {'file': file_handler, |
4087 | + 'directory': dir_handler, |
4088 | + 'symlink': link_handler, |
4089 | } |
4090 | |
4091 | self.build_tree(['source/', 'source/a', 'source/b/', 'source/b/c']) |
4092 | |
4093 | === modified file 'breezy/tests/test_pack.py' |
4094 | --- breezy/tests/test_pack.py 2017-11-11 19:14:13 +0000 |
4095 | +++ breezy/tests/test_pack.py 2017-11-12 14:04:35 +0000 |
4096 | @@ -565,7 +565,7 @@ |
4097 | """Test reading of both single bytes and all bytes in a hunk.""" |
4098 | transport = self.get_transport() |
4099 | transport.put_bytes(b'sample', b'0123456789') |
4100 | - f = pack.ReadVFile(transport.readv(b'sample', [(0,1), (1,2), (4,1), (6,2)])) |
4101 | + f = pack.ReadVFile(transport.readv(b'sample', [(0, 1), (1, 2), (4, 1), (6, 2)])) |
4102 | results = [] |
4103 | results.append(f.read(1)) |
4104 | results.append(f.read(2)) |
4105 | @@ -581,7 +581,7 @@ |
4106 | """ |
4107 | transport = self.get_transport() |
4108 | transport.put_bytes(b'sample', b'0\n2\n4\n') |
4109 | - f = pack.ReadVFile(transport.readv(b'sample', [(0,2), (2,4)])) |
4110 | + f = pack.ReadVFile(transport.readv(b'sample', [(0, 2), (2, 4)])) |
4111 | results = [] |
4112 | results.append(f.readline()) |
4113 | results.append(f.readline()) |
4114 | @@ -592,7 +592,7 @@ |
4115 | """Test exercising one byte reads, readline, and then read again.""" |
4116 | transport = self.get_transport() |
4117 | transport.put_bytes(b'sample', b'0\n2\n4\n') |
4118 | - f = pack.ReadVFile(transport.readv(b'sample', [(0,6)])) |
4119 | + f = pack.ReadVFile(transport.readv(b'sample', [(0, 6)])) |
4120 | results = [] |
4121 | results.append(f.read(1)) |
4122 | results.append(f.readline()) |
4123 | |
4124 | === modified file 'breezy/tests/test_remote.py' |
4125 | --- breezy/tests/test_remote.py 2017-09-26 00:55:04 +0000 |
4126 | +++ breezy/tests/test_remote.py 2017-11-12 14:04:35 +0000 |
4127 | @@ -2363,7 +2363,7 @@ |
4128 | result = repo.gather_stats(None) |
4129 | self.assertEqual( |
4130 | [('call_expecting_body', 'Repository.gather_stats', |
4131 | - ('quack/','','no'))], |
4132 | + ('quack/', '', 'no'))], |
4133 | client._calls) |
4134 | self.assertEqual({'revisions': 2, 'size': 18}, result) |
4135 | |
4136 | @@ -2900,7 +2900,7 @@ |
4137 | # Then it should ask the fallback, using revno/revid from the |
4138 | # history-incomplete response as the known revno/revid. |
4139 | client.add_expected_call( |
4140 | - 'Repository.get_rev_id_for_revno',('fallback/', 1, (2, 'rev-two')), |
4141 | + 'Repository.get_rev_id_for_revno', ('fallback/', 1, (2, 'rev-two')), |
4142 | 'success', ('ok', 'rev-one')) |
4143 | result = repo.get_rev_id_for_revno(1, (42, 'rev-foo')) |
4144 | self.assertEqual((True, 'rev-one'), result) |
4145 | @@ -3972,7 +3972,7 @@ |
4146 | tip = stacked.last_revision() |
4147 | stacked.repository._ensure_real() |
4148 | graph = stacked.repository.get_graph() |
4149 | - revs = [r for (r,ps) in graph.iter_ancestry([tip]) |
4150 | + revs = [r for (r, ps) in graph.iter_ancestry([tip]) |
4151 | if r != NULL_REVISION] |
4152 | revs.reverse() |
4153 | search = vf_search.PendingAncestryResult([tip], stacked.repository) |
4154 | |
4155 | === modified file 'breezy/tests/test_revision.py' |
4156 | --- breezy/tests/test_revision.py 2017-07-10 20:12:25 +0000 |
4157 | +++ breezy/tests/test_revision.py 2017-11-12 14:04:35 +0000 |
4158 | @@ -176,7 +176,7 @@ |
4159 | self.assertEqual([None, '1', '2'], history) |
4160 | rev = tree.branch.repository.get_revision('3') |
4161 | history = rev.get_history(tree.branch.repository) |
4162 | - self.assertEqual([None, '1', '2' ,'3'], history) |
4163 | + self.assertEqual([None, '1', '2', '3'], history) |
4164 | |
4165 | |
4166 | class TestReservedId(TestCase): |
4167 | |
4168 | === modified file 'breezy/tests/test_sampler.py' |
4169 | --- breezy/tests/test_sampler.py 2017-05-21 18:10:28 +0000 |
4170 | +++ breezy/tests/test_sampler.py 2017-11-12 14:04:35 +0000 |
4171 | @@ -36,4 +36,4 @@ |
4172 | class DemoTest(TestCaseInTempDir): |
4173 | |
4174 | def test_nothing(self): |
4175 | - self.assertEqual(1,1) |
4176 | + self.assertEqual(1, 1) |
4177 | |
4178 | === modified file 'breezy/tests/test_selftest.py' |
4179 | --- breezy/tests/test_selftest.py 2017-10-27 00:18:42 +0000 |
4180 | +++ breezy/tests/test_selftest.py 2017-11-12 14:04:35 +0000 |
4181 | @@ -139,7 +139,7 @@ |
4182 | class MockModule(object): |
4183 | def get_test_permutations(self): |
4184 | return sample_permutation |
4185 | - sample_permutation = [(1,2), (3,4)] |
4186 | + sample_permutation = [(1, 2), (3, 4)] |
4187 | from .per_transport import get_transport_test_permutations |
4188 | self.assertEqual(sample_permutation, |
4189 | get_transport_test_permutations(MockModule())) |
4190 | @@ -3698,7 +3698,7 @@ |
4191 | def setUp(self): |
4192 | super(Test, self).setUp() |
4193 | self.hooks = hooks.Hooks() |
4194 | - self.hooks.add_hook('myhook', 'Foo bar blah', (2,4)) |
4195 | + self.hooks.add_hook('myhook', 'Foo bar blah', (2, 4)) |
4196 | self.install_counter_hook(self.hooks, 'myhook') |
4197 | |
4198 | def no_hook(self): |
4199 | |
4200 | === modified file 'breezy/tests/test_smart.py' |
4201 | --- breezy/tests/test_smart.py 2017-08-26 13:58:53 +0000 |
4202 | +++ breezy/tests/test_smart.py 2017-11-12 14:04:35 +0000 |
4203 | @@ -122,7 +122,7 @@ |
4204 | def test_repeated_substreams_same_kind_are_one_stream(self): |
4205 | # Make a stream - an iterable of bytestrings. |
4206 | stream = [('text', [versionedfile.FulltextContentFactory(('k1',), None, |
4207 | - None, 'foo')]),('text', [ |
4208 | + None, 'foo')]), ('text', [ |
4209 | versionedfile.FulltextContentFactory(('k2',), None, None, 'bar')])] |
4210 | fmt = controldir.format_registry.get('pack-0.92')().repository_format |
4211 | bytes = smart_repo._stream_to_byte_stream(stream, fmt) |
4212 | @@ -652,7 +652,7 @@ |
4213 | backing = self.get_transport() |
4214 | request = smart_dir.SmartServerRequestOpenBranch(backing) |
4215 | branch = self.make_branch('branch') |
4216 | - checkout = branch.create_checkout('reference',lightweight=True) |
4217 | + checkout = branch.create_checkout('reference', lightweight=True) |
4218 | reference_url = _mod_bzrbranch.BranchReferenceFormat().get_reference( |
4219 | checkout.controldir) |
4220 | self.assertFileEqual(reference_url, 'reference/.bzr/branch/location') |
4221 | @@ -693,7 +693,7 @@ |
4222 | backing = self.get_transport() |
4223 | request = smart_dir.SmartServerRequestOpenBranchV2(backing) |
4224 | branch = self.make_branch('branch') |
4225 | - checkout = branch.create_checkout('reference',lightweight=True) |
4226 | + checkout = branch.create_checkout('reference', lightweight=True) |
4227 | reference_url = _mod_bzrbranch.BranchReferenceFormat().get_reference( |
4228 | checkout.controldir) |
4229 | self.assertFileEqual(reference_url, 'reference/.bzr/branch/location') |
4230 | @@ -756,7 +756,7 @@ |
4231 | backing = self.get_transport() |
4232 | request = smart_dir.SmartServerRequestOpenBranchV3(backing) |
4233 | branch = self.make_branch('branch') |
4234 | - checkout = branch.create_checkout('reference',lightweight=True) |
4235 | + checkout = branch.create_checkout('reference', lightweight=True) |
4236 | reference_url = _mod_bzrbranch.BranchReferenceFormat().get_reference( |
4237 | checkout.controldir) |
4238 | self.assertFileEqual(reference_url, 'reference/.bzr/branch/location') |
4239 | @@ -835,7 +835,7 @@ |
4240 | backing = self.get_transport() |
4241 | request = smart_branch.SmartServerBranchRequest(backing) |
4242 | branch = self.make_branch('branch') |
4243 | - checkout = branch.create_checkout('reference',lightweight=True) |
4244 | + checkout = branch.create_checkout('reference', lightweight=True) |
4245 | self.assertRaises(errors.NotBranchError, |
4246 | request.execute, 'checkout') |
4247 | |
4248 | |
4249 | === modified file 'breezy/tests/test_smart_transport.py' |
4250 | --- breezy/tests/test_smart_transport.py 2017-07-21 13:51:15 +0000 |
4251 | +++ breezy/tests/test_smart_transport.py 2017-11-12 14:04:35 +0000 |
4252 | @@ -2055,10 +2055,10 @@ |
4253 | """ |
4254 | requester, response_handler = self.make_client_protocol() |
4255 | self.assertOffsetSerialisation([], '', requester) |
4256 | - self.assertOffsetSerialisation([(1,2)], '1,2', requester) |
4257 | - self.assertOffsetSerialisation([(10,40), (0,5)], '10,40\n0,5', |
4258 | + self.assertOffsetSerialisation([(1, 2)], '1,2', requester) |
4259 | + self.assertOffsetSerialisation([(10, 40), (0, 5)], '10,40\n0,5', |
4260 | requester) |
4261 | - self.assertOffsetSerialisation([(1,2), (3,4), (100, 200)], |
4262 | + self.assertOffsetSerialisation([(1, 2), (3, 4), (100, 200)], |
4263 | '1,2\n3,4\n100,200', requester) |
4264 | |
4265 | |
4266 | @@ -2220,7 +2220,7 @@ |
4267 | input, output, 'base') |
4268 | request = client_medium.get_request() |
4269 | smart_protocol = protocol.SmartClientRequestProtocolOne(request) |
4270 | - smart_protocol.call_with_body_readv_array(('foo', ), [(1,2),(5,6)]) |
4271 | + smart_protocol.call_with_body_readv_array(('foo', ), [(1, 2), (5, 6)]) |
4272 | self.assertEqual(expected_bytes, output.getvalue()) |
4273 | |
4274 | def _test_client_read_response_tuple_raises_UnknownSmartMethod(self, |
4275 | @@ -2494,7 +2494,7 @@ |
4276 | input, output, 'base') |
4277 | request = client_medium.get_request() |
4278 | smart_protocol = self.client_protocol_class(request) |
4279 | - smart_protocol.call_with_body_readv_array(('foo', ), [(1,2),(5,6)]) |
4280 | + smart_protocol.call_with_body_readv_array(('foo', ), [(1, 2), (5, 6)]) |
4281 | self.assertEqual(expected_bytes, output.getvalue()) |
4282 | |
4283 | def test_client_read_body_bytes_all(self): |
4284 | |
4285 | === modified file 'breezy/tests/test_strace.py' |
4286 | --- breezy/tests/test_strace.py 2017-05-22 00:56:52 +0000 |
4287 | +++ breezy/tests/test_strace.py 2017-11-12 14:04:35 +0000 |
4288 | @@ -80,7 +80,7 @@ |
4289 | |
4290 | def function(): |
4291 | return "foo" |
4292 | - result, strace_result = self.strace_detailed_or_skip(function,[], {}, |
4293 | + result, strace_result = self.strace_detailed_or_skip(function, [], {}, |
4294 | follow_children=False) |
4295 | self.assertEqual("foo", result) |
4296 | self.assertIsInstance(strace_result, StraceResult) |
4297 | |
4298 | === modified file 'breezy/tests/test_textmerge.py' |
4299 | --- breezy/tests/test_textmerge.py 2017-05-21 18:10:28 +0000 |
4300 | +++ breezy/tests/test_textmerge.py 2017-11-12 14:04:35 +0000 |
4301 | @@ -35,7 +35,7 @@ |
4302 | self.assertEqualDiff(''.join(mlines), expected) |
4303 | |
4304 | def test_reprocess(self): |
4305 | - struct = [('a', 'b'), ('c',), ('def','geh'), ('i',)] |
4306 | + struct = [('a', 'b'), ('c',), ('def', 'geh'), ('i',)] |
4307 | expect = [('a', 'b'), ('c',), ('d', 'g'), ('e',), ('f', 'h'), ('i',)] |
4308 | result = Merge2.reprocess_struct(struct) |
4309 | self.assertEqual(list(result), expect) |
4310 | |
4311 | === modified file 'breezy/tests/test_transactions.py' |
4312 | --- breezy/tests/test_transactions.py 2017-05-21 18:10:28 +0000 |
4313 | +++ breezy/tests/test_transactions.py 2017-11-12 14:04:35 +0000 |
4314 | @@ -57,7 +57,7 @@ |
4315 | |
4316 | def test_register_dirty_raises(self): |
4317 | self.assertRaises(errors.ReadOnlyError, |
4318 | - self.transaction.register_dirty,"anobject") |
4319 | + self.transaction.register_dirty, "anobject") |
4320 | |
4321 | def test_map(self): |
4322 | self.assertNotEqual(None, getattr(self.transaction, "map", None)) |
4323 | |
4324 | === modified file 'breezy/tests/test_transform.py' |
4325 | --- breezy/tests/test_transform.py 2017-08-27 11:51:51 +0000 |
4326 | +++ breezy/tests/test_transform.py 2017-11-12 14:04:35 +0000 |
4327 | @@ -632,7 +632,7 @@ |
4328 | create_tree.new_file('moving_file2', root, 'later2', 'mfile2') |
4329 | create_tree.apply() |
4330 | |
4331 | - mangle_tree,root = self.get_transform() |
4332 | + mangle_tree, root = self.get_transform() |
4333 | root = mangle_tree.root |
4334 | #swap names |
4335 | name1 = mangle_tree.trans_id_tree_file_id('name1') |
4336 | @@ -660,23 +660,23 @@ |
4337 | mangle_tree.apply() |
4338 | self.assertEqual(file(self.wt.abspath('name1')).read(), 'hello2') |
4339 | self.assertEqual(file(self.wt.abspath('name2')).read(), 'hello1') |
4340 | - mfile2_path = self.wt.abspath(pathjoin('new_directory','mfile2')) |
4341 | + mfile2_path = self.wt.abspath(pathjoin('new_directory', 'mfile2')) |
4342 | self.assertEqual(mangle_tree.final_parent(mfile2), newdir) |
4343 | self.assertEqual(file(mfile2_path).read(), 'later2') |
4344 | self.assertEqual(self.wt.id2path('mfile2'), 'new_directory/mfile2') |
4345 | self.assertEqual(self.wt.path2id('new_directory/mfile2'), 'mfile2') |
4346 | - newfile_path = self.wt.abspath(pathjoin('new_directory','newfile')) |
4347 | + newfile_path = self.wt.abspath(pathjoin('new_directory', 'newfile')) |
4348 | self.assertEqual(file(newfile_path).read(), 'hello3') |
4349 | self.assertEqual(self.wt.path2id('dying_directory'), 'ddir') |
4350 | self.assertIs(self.wt.path2id('dying_directory/dying_file'), None) |
4351 | - mfile2_path = self.wt.abspath(pathjoin('new_directory','mfile2')) |
4352 | + mfile2_path = self.wt.abspath(pathjoin('new_directory', 'mfile2')) |
4353 | |
4354 | def test_both_rename(self): |
4355 | - create_tree,root = self.get_transform() |
4356 | + create_tree, root = self.get_transform() |
4357 | newdir = create_tree.new_directory('selftest', root, 'selftest-id') |
4358 | create_tree.new_file('blackbox.py', newdir, 'hello1', 'blackbox-id') |
4359 | create_tree.apply() |
4360 | - mangle_tree,root = self.get_transform() |
4361 | + mangle_tree, root = self.get_transform() |
4362 | selftest = mangle_tree.trans_id_tree_file_id('selftest-id') |
4363 | blackbox = mangle_tree.trans_id_tree_file_id('blackbox-id') |
4364 | mangle_tree.adjust_path('test', root, selftest) |
4365 | @@ -685,14 +685,14 @@ |
4366 | mangle_tree.apply() |
4367 | |
4368 | def test_both_rename2(self): |
4369 | - create_tree,root = self.get_transform() |
4370 | + create_tree, root = self.get_transform() |
4371 | breezy = create_tree.new_directory('breezy', root, 'breezy-id') |
4372 | tests = create_tree.new_directory('tests', breezy, 'tests-id') |
4373 | blackbox = create_tree.new_directory('blackbox', tests, 'blackbox-id') |
4374 | create_tree.new_file('test_too_much.py', blackbox, 'hello1', |
4375 | 'test_too_much-id') |
4376 | create_tree.apply() |
4377 | - mangle_tree,root = self.get_transform() |
4378 | + mangle_tree, root = self.get_transform() |
4379 | breezy = mangle_tree.trans_id_tree_file_id('breezy-id') |
4380 | tests = mangle_tree.trans_id_tree_file_id('tests-id') |
4381 | test_too_much = mangle_tree.trans_id_tree_file_id('test_too_much-id') |
4382 | @@ -702,12 +702,12 @@ |
4383 | mangle_tree.apply() |
4384 | |
4385 | def test_both_rename3(self): |
4386 | - create_tree,root = self.get_transform() |
4387 | + create_tree, root = self.get_transform() |
4388 | tests = create_tree.new_directory('tests', root, 'tests-id') |
4389 | create_tree.new_file('test_too_much.py', tests, 'hello1', |
4390 | 'test_too_much-id') |
4391 | create_tree.apply() |
4392 | - mangle_tree,root = self.get_transform() |
4393 | + mangle_tree, root = self.get_transform() |
4394 | tests = mangle_tree.trans_id_tree_file_id('tests-id') |
4395 | test_too_much = mangle_tree.trans_id_tree_file_id('test_too_much-id') |
4396 | mangle_tree.adjust_path('selftest', root, tests) |
4397 | @@ -752,7 +752,7 @@ |
4398 | resolve_conflicts(replace) |
4399 | replace.apply() |
4400 | |
4401 | - def _test_symlinks(self, link_name1,link_target1, |
4402 | + def _test_symlinks(self, link_name1, link_target1, |
4403 | link_name2, link_target2): |
4404 | |
4405 | def ozpath(p): return 'oz/' + p |
4406 | @@ -810,12 +810,12 @@ |
4407 | os.symlink = os_symlink |
4408 | |
4409 | def get_conflicted(self): |
4410 | - create,root = self.get_transform() |
4411 | + create, root = self.get_transform() |
4412 | create.new_file('dorothy', root, 'dorothy', 'dorothy-id') |
4413 | oz = create.new_directory('oz', root, 'oz-id') |
4414 | create.new_directory('emeraldcity', oz, 'emerald-id') |
4415 | create.apply() |
4416 | - conflicts,root = self.get_transform() |
4417 | + conflicts, root = self.get_transform() |
4418 | # set up duplicate entry, duplicate id |
4419 | new_dorothy = conflicts.new_file('dorothy', root, 'dorothy', |
4420 | 'dorothy-id') |
4421 | @@ -3214,11 +3214,11 @@ |
4422 | |
4423 | def test_merge_into_preview(self): |
4424 | work_tree = self.make_branch_and_tree('tree') |
4425 | - self.build_tree_contents([('tree/file','b\n')]) |
4426 | + self.build_tree_contents([('tree/file', 'b\n')]) |
4427 | work_tree.add('file', 'file-id') |
4428 | work_tree.commit('first commit') |
4429 | child_tree = work_tree.controldir.sprout('child').open_workingtree() |
4430 | - self.build_tree_contents([('child/file','b\nc\n')]) |
4431 | + self.build_tree_contents([('child/file', 'b\nc\n')]) |
4432 | child_tree.commit('child commit') |
4433 | child_tree.lock_write() |
4434 | self.addCleanup(child_tree.unlock) |
4435 | |
4436 | === modified file 'breezy/tests/test_tree.py' |
4437 | --- breezy/tests/test_tree.py 2017-07-30 21:23:44 +0000 |
4438 | +++ breezy/tests/test_tree.py 2017-11-12 14:04:35 +0000 |
4439 | @@ -153,7 +153,7 @@ |
4440 | # we need to pass a known file with an unknown file to get this to |
4441 | # fail when expected. |
4442 | delta = wt.changes_from(wt.basis_tree(), |
4443 | - specific_files=['known_file', 'unknown_file'] , |
4444 | + specific_files=['known_file', 'unknown_file'], |
4445 | require_versioned=False) |
4446 | self.assertEqual(len(delta.added), 1) |
4447 | |
4448 | |
4449 | === modified file 'breezy/tests/test_tsort.py' |
4450 | --- breezy/tests/test_tsort.py 2017-05-21 18:10:28 +0000 |
4451 | +++ breezy/tests/test_tsort.py 2017-11-12 14:04:35 +0000 |
4452 | @@ -208,7 +208,7 @@ |
4453 | 'C': ['A', 'B']}.items(), |
4454 | 'C', |
4455 | [(0, 'C', 0, (2,), False), |
4456 | - (1, 'B', 1, (1,1,1), True), |
4457 | + (1, 'B', 1, (1, 1, 1), True), |
4458 | (2, 'A', 0, (1,), True), |
4459 | ], |
4460 | True |
4461 | @@ -232,8 +232,8 @@ |
4462 | } |
4463 | self.assertSortAndIterate(graph, 'F', |
4464 | [(0, 'F', 0, (3,), False), |
4465 | - (1, 'D', 1, (2,2,1), False), |
4466 | - (2, 'C', 2, (2,1,1), True), |
4467 | + (1, 'D', 1, (2, 2, 1), False), |
4468 | + (2, 'C', 2, (2, 1, 1), True), |
4469 | (3, 'B', 0, (2,), False), |
4470 | (4, 'A', 0, (1,), True), |
4471 | ], True) |
4472 | @@ -255,9 +255,9 @@ |
4473 | } |
4474 | self.assertSortAndIterate(graph, 'F', |
4475 | [(0, 'F', 0, (3,), False), |
4476 | - (1, 'D', 1, (2,1,2), False), |
4477 | - (2, 'C', 2, (2,2,1), True), |
4478 | - (3, 'X', 1, (2,1,1), True), |
4479 | + (1, 'D', 1, (2, 1, 2), False), |
4480 | + (2, 'C', 2, (2, 2, 1), True), |
4481 | + (3, 'X', 1, (2, 1, 1), True), |
4482 | (4, 'B', 0, (2,), False), |
4483 | (5, 'A', 0, (1,), True), |
4484 | ], True) |
4485 | @@ -308,12 +308,12 @@ |
4486 | }.items(), |
4487 | 'A', |
4488 | [(0, 'A', 0, (3,), False), |
4489 | - (1, 'B', 1, (1,3,2), False), |
4490 | - (2, 'C', 1, (1,3,1), True), |
4491 | + (1, 'B', 1, (1, 3, 2), False), |
4492 | + (2, 'C', 1, (1, 3, 1), True), |
4493 | (3, 'D', 0, (2,), False), |
4494 | - (4, 'E', 1, (1,1,2), False), |
4495 | - (5, 'F', 2, (1,2,1), True), |
4496 | - (6, 'G', 1, (1,1,1), True), |
4497 | + (4, 'E', 1, (1, 1, 2), False), |
4498 | + (5, 'F', 2, (1, 2, 1), True), |
4499 | + (6, 'G', 1, (1, 1, 1), True), |
4500 | (7, 'H', 0, (1,), True), |
4501 | ], |
4502 | True |
4503 | @@ -347,14 +347,14 @@ |
4504 | }.items(), |
4505 | 'L', |
4506 | [(0, 'L', 0, (6,), False), |
4507 | - (1, 'K', 1, (1,3,2), False), |
4508 | - (2, 'I', 1, (1,3,1), True), |
4509 | + (1, 'K', 1, (1, 3, 2), False), |
4510 | + (2, 'I', 1, (1, 3, 1), True), |
4511 | (3, 'J', 0, (5,), False), |
4512 | - (4, 'H', 1, (1,2,2), False), |
4513 | - (5, 'F', 1, (1,2,1), True), |
4514 | + (4, 'H', 1, (1, 2, 2), False), |
4515 | + (5, 'F', 1, (1, 2, 1), True), |
4516 | (6, 'G', 0, (4,), False), |
4517 | - (7, 'E', 1, (1,1,2), False), |
4518 | - (8, 'C', 1, (1,1,1), True), |
4519 | + (7, 'E', 1, (1, 1, 2), False), |
4520 | + (8, 'C', 1, (1, 1, 1), True), |
4521 | (9, 'D', 0, (3,), False), |
4522 | (10, 'B', 0, (2,), False), |
4523 | (11, 'A', 0, (1,), True), |
4524 | @@ -381,16 +381,16 @@ |
4525 | }.items(), |
4526 | 'N', |
4527 | [(0, 'N', 0, (7,), False), |
4528 | - (1, 'M', 1, (1,4,1), True), |
4529 | + (1, 'M', 1, (1, 4, 1), True), |
4530 | (2, 'L', 0, (6,), False), |
4531 | - (3, 'K', 1, (1,3,2), False), |
4532 | - (4, 'I', 1, (1,3,1), True), |
4533 | + (3, 'K', 1, (1, 3, 2), False), |
4534 | + (4, 'I', 1, (1, 3, 1), True), |
4535 | (5, 'J', 0, (5,), False), |
4536 | - (6, 'H', 1, (1,2,2), False), |
4537 | - (7, 'F', 1, (1,2,1), True), |
4538 | + (6, 'H', 1, (1, 2, 2), False), |
4539 | + (7, 'F', 1, (1, 2, 1), True), |
4540 | (8, 'G', 0, (4,), False), |
4541 | - (9, 'E', 1, (1,1,2), False), |
4542 | - (10, 'C', 1, (1,1,1), True), |
4543 | + (9, 'E', 1, (1, 1, 2), False), |
4544 | + (10, 'C', 1, (1, 1, 1), True), |
4545 | (11, 'D', 0, (3,), False), |
4546 | (12, 'B', 0, (2,), False), |
4547 | (13, 'A', 0, (1,), True), |
4548 | @@ -470,12 +470,12 @@ |
4549 | }, |
4550 | 'A', |
4551 | [(0, 'A', 0, (2,), False), |
4552 | - (1, 'B', 1, (1,3,2), False), |
4553 | - (2, 'C', 2, (1,4,1), True), |
4554 | - (3, 'D', 1, (1,3,1), True), |
4555 | - (4, 'E', 1, (1,1,2), False), |
4556 | - (5, 'F', 2, (1,2,1), True), |
4557 | - (6, 'G', 1, (1,1,1), True), |
4558 | + (1, 'B', 1, (1, 3, 2), False), |
4559 | + (2, 'C', 2, (1, 4, 1), True), |
4560 | + (3, 'D', 1, (1, 3, 1), True), |
4561 | + (4, 'E', 1, (1, 1, 2), False), |
4562 | + (5, 'F', 2, (1, 2, 1), True), |
4563 | + (6, 'G', 1, (1, 1, 1), True), |
4564 | (7, 'H', 0, (1,), True), |
4565 | ], |
4566 | True |
4567 | @@ -534,7 +534,7 @@ |
4568 | 'A', |
4569 | [(0, 'A', 0, (4,), False), |
4570 | (1, 'B', 0, (3,), False), |
4571 | - (2, 'C', 1, (2,1,1), True), |
4572 | + (2, 'C', 1, (2, 1, 1), True), |
4573 | ], |
4574 | True, |
4575 | mainline_revisions=['D', 'B', 'A'] |
4576 | @@ -583,7 +583,7 @@ |
4577 | 'C': ['A', 'B']}.items(), |
4578 | 'C', |
4579 | [(0, 'C', 0, (2,), False), |
4580 | - (1, 'B', 1, (0,1,1), True), |
4581 | + (1, 'B', 1, (0, 1, 1), True), |
4582 | (2, 'A', 0, (1,), True), |
4583 | ], |
4584 | True |
4585 | @@ -622,14 +622,14 @@ |
4586 | }.items(), |
4587 | 'J', |
4588 | [(0, 'J', 0, (4,), False), |
4589 | - (1, 'I', 1, (1,3,2), False), |
4590 | - (2, 'H', 1, (1,3,1), True), |
4591 | + (1, 'I', 1, (1, 3, 2), False), |
4592 | + (2, 'H', 1, (1, 3, 1), True), |
4593 | (3, 'G', 0, (3,), False), |
4594 | - (4, 'F', 1, (1,2,2), False), |
4595 | - (5, 'E', 1, (1,2,1), True), |
4596 | + (4, 'F', 1, (1, 2, 2), False), |
4597 | + (5, 'E', 1, (1, 2, 1), True), |
4598 | (6, 'D', 0, (2,), False), |
4599 | - (7, 'C', 1, (1,1,2), False), |
4600 | - (8, 'B', 1, (1,1,1), True), |
4601 | + (7, 'C', 1, (1, 1, 2), False), |
4602 | + (8, 'B', 1, (1, 1, 1), True), |
4603 | (9, 'A', 0, (1,), True), |
4604 | ], |
4605 | True |
4606 | @@ -673,20 +673,20 @@ |
4607 | }.items(), |
4608 | 'R', |
4609 | [( 0, 'R', 0, (6,), False), |
4610 | - ( 1, 'Q', 1, (0,4,5), False), |
4611 | - ( 2, 'P', 2, (0,6,1), True), |
4612 | - ( 3, 'O', 1, (0,4,4), False), |
4613 | - ( 4, 'N', 1, (0,4,3), False), |
4614 | - ( 5, 'M', 2, (0,5,1), True), |
4615 | - ( 6, 'L', 1, (0,4,2), False), |
4616 | - ( 7, 'K', 1, (0,4,1), True), |
4617 | + ( 1, 'Q', 1, (0, 4, 5), False), |
4618 | + ( 2, 'P', 2, (0, 6, 1), True), |
4619 | + ( 3, 'O', 1, (0, 4, 4), False), |
4620 | + ( 4, 'N', 1, (0, 4, 3), False), |
4621 | + ( 5, 'M', 2, (0, 5, 1), True), |
4622 | + ( 6, 'L', 1, (0, 4, 2), False), |
4623 | + ( 7, 'K', 1, (0, 4, 1), True), |
4624 | ( 8, 'J', 0, (5,), False), |
4625 | - ( 9, 'I', 1, (0,3,1), True), |
4626 | + ( 9, 'I', 1, (0, 3, 1), True), |
4627 | (10, 'H', 0, (4,), False), |
4628 | - (11, 'G', 1, (0,1,3), False), |
4629 | - (12, 'F', 2, (0,2,1), True), |
4630 | - (13, 'E', 1, (0,1,2), False), |
4631 | - (14, 'D', 1, (0,1,1), True), |
4632 | + (11, 'G', 1, (0, 1, 3), False), |
4633 | + (12, 'F', 2, (0, 2, 1), True), |
4634 | + (13, 'E', 1, (0, 1, 2), False), |
4635 | + (14, 'D', 1, (0, 1, 1), True), |
4636 | (15, 'C', 0, (3,), False), |
4637 | (16, 'B', 0, (2,), False), |
4638 | (17, 'A', 0, (1,), True), |
4639 | |
4640 | === modified file 'breezy/tests/test_vf_search.py' |
4641 | --- breezy/tests/test_vf_search.py 2017-06-08 23:30:31 +0000 |
4642 | +++ breezy/tests/test_vf_search.py 2017-11-12 14:04:35 +0000 |
4643 | @@ -133,11 +133,11 @@ |
4644 | missing_keys=[NULL_REVISION]) |
4645 | |
4646 | def test_partial_search(self): |
4647 | - parent_map = dict((k,extended_history_shortcut[k]) |
4648 | + parent_map = dict((k, extended_history_shortcut[k]) |
4649 | for k in ['e', 'f']) |
4650 | self.assertSearchResult(['e', 'f'], ['d', 'a'], 2, |
4651 | parent_map) |
4652 | - parent_map.update((k,extended_history_shortcut[k]) |
4653 | + parent_map.update((k, extended_history_shortcut[k]) |
4654 | for k in ['d', 'a']) |
4655 | self.assertSearchResult(['e', 'f'], ['c', NULL_REVISION], 4, |
4656 | parent_map) |
4657 | |
4658 | === modified file 'breezy/tests/test_weave.py' |
4659 | --- breezy/tests/test_weave.py 2017-07-10 22:36:09 +0000 |
4660 | +++ breezy/tests/test_weave.py 2017-11-12 14:04:35 +0000 |
4661 | @@ -345,7 +345,7 @@ |
4662 | k._parents = [frozenset(), |
4663 | frozenset([0]), |
4664 | frozenset([0]), |
4665 | - frozenset([0,1,2]), |
4666 | + frozenset([0, 1, 2]), |
4667 | ] |
4668 | k._weave = [('{', 0), |
4669 | 'foo {', |
4670 | @@ -378,7 +378,7 @@ |
4671 | k._parents = [frozenset(), |
4672 | frozenset([0]), |
4673 | frozenset([0]), |
4674 | - frozenset([0,1,2]), |
4675 | + frozenset([0, 1, 2]), |
4676 | ] |
4677 | k._weave = [('{', 0), |
4678 | 'foo {', |
4679 | |
4680 | === modified file 'breezy/tests/test_workingtree_4.py' |
4681 | --- breezy/tests/test_workingtree_4.py 2017-07-31 22:36:57 +0000 |
4682 | +++ breezy/tests/test_workingtree_4.py 2017-11-12 14:04:35 +0000 |
4683 | @@ -781,7 +781,7 @@ |
4684 | # Now add in an invalid entry, a rename with a dangling pointer |
4685 | state._dirblocks[1][1].append((('', 'foo', 'foo-id'), |
4686 | [('f', '', 0, False, ''), |
4687 | - ('r', 'bar', 0 , False, '')])) |
4688 | + ('r', 'bar', 0, False, '')])) |
4689 | self.assertListRaises(dirstate.DirstateCorrupt, |
4690 | tree.iter_changes, tree.basis_tree()) |
4691 | finally: |
4692 | |
4693 | === modified file 'breezy/tests/test_wsgi.py' |
4694 | --- breezy/tests/test_wsgi.py 2017-06-11 20:15:04 +0000 |
4695 | +++ breezy/tests/test_wsgi.py 2017-11-12 14:04:35 +0000 |
4696 | @@ -43,7 +43,7 @@ |
4697 | 'SERVER_PROTOCOL': 'HTTP/1.0', |
4698 | |
4699 | # Required WSGI variables |
4700 | - 'wsgi.version': (1,0), |
4701 | + 'wsgi.version': (1, 0), |
4702 | 'wsgi.url_scheme': 'http', |
4703 | 'wsgi.input': BytesIO(b''), |
4704 | 'wsgi.errors': BytesIO(), |
4705 | @@ -110,7 +110,7 @@ |
4706 | }) |
4707 | iterable = wsgi_app(environ, self.start_response) |
4708 | response = self.read_response(iterable) |
4709 | - self.assertEqual([('clone', 'foo/bar/')] , transport.calls) |
4710 | + self.assertEqual([('clone', 'foo/bar/')], transport.calls) |
4711 | |
4712 | def test_smart_wsgi_app_request_and_response(self): |
4713 | # SmartWSGIApp reads the smart request from the 'wsgi.input' file-like |
4714 | |
4715 | === modified file 'breezy/transport/ftp/__init__.py' |
4716 | --- breezy/transport/ftp/__init__.py 2017-05-30 19:16:23 +0000 |
4717 | +++ breezy/transport/ftp/__init__.py 2017-11-12 14:04:35 +0000 |
4718 | @@ -296,7 +296,7 @@ |
4719 | """ |
4720 | abspath = self._remote_path(relpath) |
4721 | tmp_abspath = '%s.tmp.%.9f.%d.%d' % (abspath, time.time(), |
4722 | - os.getpid(), random.randint(0,0x7FFFFFFF)) |
4723 | + os.getpid(), random.randint(0, 0x7FFFFFFF)) |
4724 | bytes = None |
4725 | if getattr(fp, 'read', None) is None: |
4726 | # hand in a string IO |
4727 | |
4728 | === modified file 'breezy/transport/http/__init__.py' |
4729 | --- breezy/transport/http/__init__.py 2017-06-11 20:15:04 +0000 |
4730 | +++ breezy/transport/http/__init__.py 2017-11-12 14:04:35 +0000 |
4731 | @@ -226,7 +226,7 @@ |
4732 | |
4733 | except (errors.ShortReadvError, errors.InvalidRange, |
4734 | errors.InvalidHttpRange, errors.HttpBoundaryMissing) as e: |
4735 | - mutter('Exception %r: %s during http._readv',e, e) |
4736 | + mutter('Exception %r: %s during http._readv', e, e) |
4737 | if (not isinstance(e, errors.ShortReadvError) |
4738 | or retried_offset == cur_offset_and_size): |
4739 | # We don't degrade the range hint for ShortReadvError since |
4740 | |
4741 | === modified file 'breezy/transport/http/_urllib2_wrappers.py' |
4742 | --- breezy/transport/http/_urllib2_wrappers.py 2017-09-26 00:55:04 +0000 |
4743 | +++ breezy/transport/http/_urllib2_wrappers.py 2017-11-12 14:04:35 +0000 |
4744 | @@ -267,7 +267,7 @@ |
4745 | """ |
4746 | |
4747 | # Some responses have bodies in which we have no interest |
4748 | - _body_ignored_responses = [301,302, 303, 307, 400, 401, 403, 404, 501] |
4749 | + _body_ignored_responses = [301, 302, 303, 307, 400, 401, 403, 404, 501] |
4750 | |
4751 | # in finish() below, we may have to discard several MB in the worst |
4752 | # case. To avoid buffering that much, we read and discard by chunks |
4753 | @@ -784,7 +784,7 @@ |
4754 | if 'http' in debug.debug_flags: |
4755 | trace.mutter('> %s %s' % (method, url)) |
4756 | hdrs = [] |
4757 | - for k,v in headers.items(): |
4758 | + for k, v in headers.items(): |
4759 | # People are often told to paste -Dhttp output to help |
4760 | # debug. Don't compromise credentials. |
4761 | if k in ('Authorization', 'Proxy-Authorization'): |
4762 | @@ -945,7 +945,7 @@ |
4763 | # if we want to be sure, we MUST follow them. |
4764 | |
4765 | if code in (301, 302, 303, 307): |
4766 | - return Request(req.get_method(),newurl, |
4767 | + return Request(req.get_method(), newurl, |
4768 | headers = req.headers, |
4769 | origin_req_host = req.get_origin_req_host(), |
4770 | unverifiable = True, |
4771 | |
4772 | === modified file 'breezy/transport/local.py' |
4773 | --- breezy/transport/local.py 2017-06-10 01:57:00 +0000 |
4774 | +++ breezy/transport/local.py 2017-11-12 14:04:35 +0000 |
4775 | @@ -233,7 +233,7 @@ |
4776 | # We couldn't create the file, maybe we need to create |
4777 | # the parent directory, and try again |
4778 | if (not create_parent_dir |
4779 | - or e.errno not in (errno.ENOENT,errno.ENOTDIR)): |
4780 | + or e.errno not in (errno.ENOENT, errno.ENOTDIR)): |
4781 | self._translate_error(e, relpath) |
4782 | parent_dir = os.path.dirname(abspath) |
4783 | if not parent_dir: |
4784 | |
4785 | === modified file 'breezy/transport/log.py' |
4786 | --- breezy/transport/log.py 2017-05-23 22:07:16 +0000 |
4787 | +++ breezy/transport/log.py 2017-11-12 14:04:35 +0000 |
4788 | @@ -119,7 +119,7 @@ |
4789 | self._shorten(val), result_len) |
4790 | elif methodname == 'readv': |
4791 | num_hunks = len(result) |
4792 | - total_bytes = sum((len(d) for o,d in result)) |
4793 | + total_bytes = sum((len(d) for o, d in result)) |
4794 | shown_result = "readv response, %d hunks, %d total bytes" % ( |
4795 | num_hunks, total_bytes) |
4796 | result_len = total_bytes |
4797 | |
4798 | === modified file 'breezy/transport/sftp.py' |
4799 | --- breezy/transport/sftp.py 2017-08-26 13:06:15 +0000 |
4800 | +++ breezy/transport/sftp.py 2017-11-12 14:04:35 +0000 |
4801 | @@ -514,7 +514,7 @@ |
4802 | def _put(self, abspath, f, mode=None): |
4803 | """Helper function so both put() and copy_abspaths can reuse the code""" |
4804 | tmp_abspath = '%s.tmp.%.9f.%d.%d' % (abspath, time.time(), |
4805 | - os.getpid(), random.randint(0,0x7FFFFFFF)) |
4806 | + os.getpid(), random.randint(0, 0x7FFFFFFF)) |
4807 | fout = self._sftp_open_exclusive(tmp_abspath, mode=mode) |
4808 | closed = False |
4809 | try: |
4810 | |
4811 | === modified file 'breezy/tree.py' |
4812 | --- breezy/tree.py 2017-08-29 13:25:07 +0000 |
4813 | +++ breezy/tree.py 2017-11-12 14:04:35 +0000 |
4814 | @@ -653,7 +653,7 @@ |
4815 | prefs = next(self.iter_search_rules([path], filter_pref_names)) |
4816 | stk = filters._get_filter_stack_for(prefs) |
4817 | if 'filters' in debug.debug_flags: |
4818 | - trace.note(gettext("*** {0} content-filter: {1} => {2!r}").format(path,prefs,stk)) |
4819 | + trace.note(gettext("*** {0} content-filter: {1} => {2!r}").format(path, prefs, stk)) |
4820 | return stk |
4821 | |
4822 | def _content_filter_stack_provider(self): |
4823 | |
4824 | === modified file 'breezy/urlutils.py' |
4825 | --- breezy/urlutils.py 2017-07-15 13:23:08 +0000 |
4826 | +++ breezy/urlutils.py 2017-11-12 14:04:35 +0000 |
4827 | @@ -686,7 +686,7 @@ |
4828 | _hex_display_map = dict(([('%02x' % o, chr(o)) for o in range(256)] |
4829 | + [('%02X' % o, chr(o)) for o in range(256)])) |
4830 | #These entries get mapped to themselves |
4831 | -_hex_display_map.update((hex,'%'+hex) for hex in _no_decode_hex) |
4832 | +_hex_display_map.update((hex, '%'+hex) for hex in _no_decode_hex) |
4833 | |
4834 | # These characters shouldn't be percent-encoded, and it's always safe to |
4835 | # unencode them if they are. |
4836 | @@ -885,7 +885,7 @@ |
4837 | |
4838 | if ':' in host and not (host[0] == '[' and host[-1] == ']'): |
4839 | # there *is* port |
4840 | - host, port = host.rsplit(':',1) |
4841 | + host, port = host.rsplit(':', 1) |
4842 | try: |
4843 | port = int(port) |
4844 | except ValueError: |
4845 | |
4846 | === modified file 'breezy/util/_bencode_py.py' |
4847 | --- breezy/util/_bencode_py.py 2017-06-16 20:54:19 +0000 |
4848 | +++ breezy/util/_bencode_py.py 2017-11-12 14:04:35 +0000 |
4849 | @@ -109,10 +109,10 @@ |
4850 | self.bencoded = s |
4851 | |
4852 | |
4853 | -def encode_bencached(x,r): |
4854 | +def encode_bencached(x, r): |
4855 | r.append(x.bencoded) |
4856 | |
4857 | -def encode_bool(x,r): |
4858 | +def encode_bool(x, r): |
4859 | encode_int(int(x), r) |
4860 | |
4861 | def encode_int(x, r): |
4862 | @@ -127,7 +127,7 @@ |
4863 | encode_func[type(i)](i, r) |
4864 | r.append(b'e') |
4865 | |
4866 | -def encode_dict(x,r): |
4867 | +def encode_dict(x, r): |
4868 | r.append(b'd') |
4869 | ilist = sorted(x.items()) |
4870 | for k, v in ilist: |
4871 | |
4872 | === modified file 'breezy/views.py' |
4873 | --- breezy/views.py 2017-08-26 13:58:53 +0000 |
4874 | +++ breezy/views.py 2017-11-12 14:04:35 +0000 |
4875 | @@ -222,7 +222,7 @@ |
4876 | """Convert view keywords and a view dictionary into a stream.""" |
4877 | lines = [_VIEWS_FORMAT1_MARKER] |
4878 | for key in keywords: |
4879 | - line = "%s=%s\n" % (key,keywords[key]) |
4880 | + line = "%s=%s\n" % (key, keywords[key]) |
4881 | lines.append(line.encode('utf-8')) |
4882 | if view_dict: |
4883 | lines.append("views:\n".encode('utf-8')) |
4884 | |
4885 | === modified file 'breezy/win32utils.py' |
4886 | --- breezy/win32utils.py 2017-06-05 23:54:45 +0000 |
4887 | +++ breezy/win32utils.py 2017-11-12 14:04:35 +0000 |
4888 | @@ -193,7 +193,7 @@ |
4889 | pass |
4890 | else: |
4891 | buf = ctypes.create_unicode_buffer(MAX_PATH) |
4892 | - if SHGetSpecialFolderPath(None,buf,csidl,0): |
4893 | + if SHGetSpecialFolderPath(None, buf, csidl, 0): |
4894 | return buf.value |
4895 | |
4896 | global has_win32com_shell |
The attempt to merge lp:~gz/brz/ws_comma into lp:brz failed. Below is the output from the failed tests.
brz: warning: some compiled extensions could not be loaded; see ``brz help missing- extensions` ` _annotator_ pyx.pyx: 107:18: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. _annotator_ pyx.pyx: 107:25: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. _annotator_ pyx.pyx: 107:32: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. _annotator_ pyx.pyx: 174:22: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. _annotator_ pyx.pyx: 174:33: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. _annotator_ pyx.pyx: 175:18: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. _annotator_ pyx.pyx: 175:30: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. _annotator_ pyx.pyx: 200:18: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. _annotator_ pyx.pyx: 200:29: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. _bencode_ pyx.c: In function ‘__pyx_ f_6breezy_ 12_bencode_ pyx_7Encoder_ _encode_ string’ : _bencode_ pyx.c:4870: 100: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘Py_ssize_t {aka long int}’ [-Wformat=] __pyx_v_ self->tail, __pyx_e_ 6breezy_ 12_bencode_ pyx_INT_ BUF_SIZE, ((char *)"%d:"), __pyx_v_x_len);
~^
%ld bzr/_groupcompr ess_pyx. pyx:329: 54: Unreachable code bzr/_groupcompr ess_pyx. pyx:513: 8: Unreachable code bzr/_groupcompr ess_pyx. pyx:450: 23: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. bzr/_groupcompr ess_pyx. pyx:450: 30: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. bzr/_groupcompr ess_pyx. pyx:451: 23: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line. bzr/_groupcompr ess_pyx. pyx:451: 33: Non-trivial type declarators in shared declarat...
warning: breezy/
warning: breezy/
warning: breezy/
warning: breezy/
warning: breezy/
warning: breezy/
warning: breezy/
warning: breezy/
warning: breezy/
breezy/
breezy/
__pyx_v_n = snprintf(
warning: breezy/
warning: breezy/
warning: breezy/
warning: breezy/
warning: breezy/
warning: breezy/