Merge lp:~jelmer/brz/more-deprecations into lp:brz

Proposed by Jelmer Vernooij on 2017-06-27
Status: Merged
Approved by: Jelmer Vernooij on 2017-06-27
Approved revision: 6723
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/more-deprecations
Merge into: lp:brz
Diff against target: 671 lines (+74/-110)
12 files modified
breezy/builtins.py (+3/-5)
breezy/merge.py (+10/-24)
breezy/missing.py (+3/-10)
breezy/shelf.py (+2/-2)
breezy/shelf_ui.py (+1/-1)
breezy/tests/per_branch/test_branch.py (+1/-1)
breezy/tests/per_merger.py (+1/-1)
breezy/tests/test_merge.py (+18/-25)
breezy/tests/test_merge_core.py (+7/-11)
breezy/tests/test_missing.py (+25/-25)
breezy/tests/test_transform.py (+3/-4)
breezy/workingtree.py (+0/-1)
To merge this branch: bzr merge lp:~jelmer/brz/more-deprecations
Reviewer Review Type Date Requested Status
Martin Packman 2017-06-27 Approve on 2017-06-27
Review via email: mp+326342@code.launchpad.net

Commit message

Remove some more already deprecated arguments.

Description of the change

Remove some more already deprecated arguments.

Be consistent in what various "missing" functions return - include the merge_depth.

To post a comment you must log in.
Martin Packman (gz) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/builtins.py'
2--- breezy/builtins.py 2017-06-19 14:35:58 +0000
3+++ breezy/builtins.py 2017-06-27 10:27:58 +0000
4@@ -1411,8 +1411,6 @@
5
6 To retrieve the branch as of a particular revision, supply the --revision
7 parameter, as in "branch foo/bar -r 5".
8-
9- The synonyms 'clone' and 'get' for this command are deprecated.
10 """
11
12 _see_also = ['checkout']
13@@ -4406,7 +4404,7 @@
14 raise errors.BzrCommandError(gettext(
15 'Cannot use -r with merge directives or bundles'))
16 merger, verified = _mod_merge.Merger.from_mergeable(tree,
17- mergeable, None)
18+ mergeable)
19
20 if merger is None and uncommitted:
21 if revision is not None and len(revision) > 0:
22@@ -4561,7 +4559,7 @@
23 # Merge tags (but don't set them in the master branch yet, the user
24 # might revert this merge). Commit will propagate them.
25 other_branch.tags.merge_to(tree.branch.tags, ignore_master=True)
26- merger = _mod_merge.Merger.from_revision_ids(pb, tree,
27+ merger = _mod_merge.Merger.from_revision_ids(tree,
28 other_revision_id, base_revision_id, other_branch, base_branch)
29 if other_path != '':
30 allow_pending = False
31@@ -4713,7 +4711,7 @@
32 # have not yet been seen.
33 tree.set_parent_ids(parents[:1])
34 try:
35- merger = _mod_merge.Merger.from_revision_ids(None, tree, parents[1])
36+ merger = _mod_merge.Merger.from_revision_ids(tree, parents[1])
37 merger.interesting_ids = interesting_ids
38 merger.merge_type = merge_type
39 merger.show_base = show_base
40
41=== modified file 'breezy/merge.py'
42--- breezy/merge.py 2017-06-10 01:39:46 +0000
43+++ breezy/merge.py 2017-06-27 10:27:58 +0000
44@@ -280,7 +280,7 @@
45 hooks = MergeHooks()
46
47 def __init__(self, this_branch, other_tree=None, base_tree=None,
48- this_tree=None, pb=None, change_reporter=None,
49+ this_tree=None, change_reporter=None,
50 recurse='down', revision_graph=None):
51 object.__init__(self)
52 self.this_branch = this_branch
53@@ -299,8 +299,6 @@
54 self.interesting_files = None
55 self.show_base = False
56 self.reprocess = False
57- if pb is not None:
58- warnings.warn("pb parameter to Merger() is deprecated and ignored")
59 self.pp = None
60 self.recurse = recurse
61 self.change_reporter = change_reporter
62@@ -354,30 +352,28 @@
63 _set_base_is_other_ancestor)
64
65 @staticmethod
66- def from_uncommitted(tree, other_tree, pb=None, base_tree=None):
67+ def from_uncommitted(tree, other_tree, base_tree=None):
68 """Return a Merger for uncommitted changes in other_tree.
69
70 :param tree: The tree to merge into
71 :param other_tree: The tree to get uncommitted changes from
72- :param pb: A progress indicator
73 :param base_tree: The basis to use for the merge. If unspecified,
74 other_tree.basis_tree() will be used.
75 """
76 if base_tree is None:
77 base_tree = other_tree.basis_tree()
78- merger = Merger(tree.branch, other_tree, base_tree, tree, pb)
79+ merger = Merger(tree.branch, other_tree, base_tree, tree)
80 merger.base_rev_id = merger.base_tree.get_revision_id()
81 merger.other_rev_id = None
82 merger.other_basis = merger.base_rev_id
83 return merger
84
85 @classmethod
86- def from_mergeable(klass, tree, mergeable, pb):
87+ def from_mergeable(klass, tree, mergeable):
88 """Return a Merger for a bundle or merge directive.
89
90 :param tree: The tree to merge changes into
91 :param mergeable: A merge directive or bundle
92- :param pb: A progress indicator
93 """
94 mergeable.install_revisions(tree.branch.repository)
95 base_revision_id, other_revision_id, verified =\
96@@ -390,18 +386,17 @@
97 base_revision_id = None
98 else:
99 trace.warning('Performing cherrypick')
100- merger = klass.from_revision_ids(pb, tree, other_revision_id,
101+ merger = klass.from_revision_ids(tree, other_revision_id,
102 base_revision_id, revision_graph=
103 revision_graph)
104 return merger, verified
105
106 @staticmethod
107- def from_revision_ids(pb, tree, other, base=None, other_branch=None,
108+ def from_revision_ids(tree, other, base=None, other_branch=None,
109 base_branch=None, revision_graph=None,
110 tree_branch=None):
111 """Return a Merger for revision-ids.
112
113- :param pb: A progress indicator
114 :param tree: The tree to merge changes into
115 :param other: The revision-id to use as OTHER
116 :param base: The revision-id to use as BASE. If not specified, will
117@@ -417,7 +412,7 @@
118 """
119 if tree_branch is None:
120 tree_branch = tree.branch
121- merger = Merger(tree_branch, this_tree=tree, pb=pb,
122+ merger = Merger(tree_branch, this_tree=tree,
123 revision_graph=revision_graph)
124 if other_branch is None:
125 other_branch = tree.branch
126@@ -642,8 +637,7 @@
127 if self._is_criss_cross and getattr(self.merge_type,
128 'supports_lca_trees', False):
129 kwargs['lca_trees'] = self._lca_trees
130- return self.merge_type(pb=None,
131- change_reporter=self.change_reporter,
132+ return self.merge_type(change_reporter=self.change_reporter,
133 **kwargs)
134
135 def _do_merge_to(self):
136@@ -725,8 +719,7 @@
137
138 def __init__(self, working_tree, this_tree, base_tree, other_tree,
139 interesting_ids=None, reprocess=False, show_base=False,
140- pb=None, pp=None, change_reporter=None,
141- interesting_files=None, do_merge=True,
142+ change_reporter=None, interesting_files=None, do_merge=True,
143 cherrypick=False, lca_trees=None, this_branch=None,
144 other_branch=None):
145 """Initialize the merger object and perform the merge.
146@@ -744,8 +737,6 @@
147 :param: reprocess If True, perform conflict-reduction processing.
148 :param show_base: If True, show the base revision in text conflicts.
149 (incompatible with reprocess)
150- :param pb: ignored
151- :param pp: A ProgressPhase object
152 :param change_reporter: An object that should report changes made
153 :param interesting_files: The tree-relative paths of files that should
154 participate in the merge. If these paths refer to directories,
155@@ -785,10 +776,6 @@
156 self.cherrypick = cherrypick
157 if do_merge:
158 self.do_merge()
159- if pp is not None:
160- warnings.warn("pp argument to Merge3Merger is deprecated")
161- if pb is not None:
162- warnings.warn("pb argument to Merge3Merger is deprecated")
163
164 def do_merge(self):
165 operation = cleanup.OperationWithCleanups(self._do_merge)
166@@ -1922,7 +1909,6 @@
167 other_rev_id=None,
168 interesting_files=None,
169 this_tree=None,
170- pb=None,
171 change_reporter=None):
172 """Primary interface for merging.
173
174@@ -1935,7 +1921,7 @@
175 raise errors.BzrError("breezy.merge.merge_inner requires a this_tree "
176 "parameter")
177 merger = Merger(this_branch, other_tree, base_tree, this_tree=this_tree,
178- pb=pb, change_reporter=change_reporter)
179+ change_reporter=change_reporter)
180 merger.backup_files = backup_files
181 merger.merge_type = merge_type
182 merger.interesting_ids = interesting_ids
183
184=== modified file 'breezy/missing.py'
185--- breezy/missing.py 2017-05-30 19:16:23 +0000
186+++ breezy/missing.py 2017-06-27 10:27:58 +0000
187@@ -30,14 +30,7 @@
188
189 if rev_tag_dict is None:
190 rev_tag_dict = {}
191- for rev in revisions:
192- # We need the following for backward compatibilty (hopefully
193- # this will be deprecated soon :-/) -- vila 080911
194- if len(rev) == 2:
195- revno, rev_id = rev
196- merge_depth = 0
197- else:
198- revno, rev_id, merge_depth = rev
199+ for revno, rev_id, merge_depth in revisions:
200 rev = revision_source.get_revision(rev_id)
201 if verbose:
202 delta = revision_source.get_revision_delta(rev_id)
203@@ -97,7 +90,7 @@
204 :param tip: The tip of mainline
205 :param backward: Show oldest versions first when True, newest versions
206 first when False.
207- :return: [(revno, revision_id)] for all revisions in ancestry that
208+ :return: [(revno, revision_id, 0)] for all revisions in ancestry that
209 are left-hand parents from tip, or None if ancestry is None.
210 """
211 if ancestry is None:
212@@ -117,7 +110,7 @@
213 parents = parent_map.get(cur)
214 if not parents:
215 break # Ghost, we are done
216- mainline.append((str(cur_revno), cur))
217+ mainline.append((str(cur_revno), cur, 0))
218 cur = parents[0]
219 cur_revno -= 1
220 if not backward:
221
222=== modified file 'breezy/shelf.py'
223--- breezy/shelf.py 2017-06-08 23:30:31 +0000
224+++ breezy/shelf.py 2017-06-27 10:27:58 +0000
225@@ -344,11 +344,11 @@
226 tt.deserialize(records)
227 return klass(tree, base_tree, tt, metadata.get('message'))
228
229- def make_merger(self, task=None):
230+ def make_merger(self):
231 """Return a merger that can unshelve the changes."""
232 target_tree = self.transform.get_preview_tree()
233 merger = merge.Merger.from_uncommitted(self.tree, target_tree,
234- task, self.base_tree)
235+ self.base_tree)
236 merger.merge_type = merge.Merge3Merger
237 return merger
238
239
240=== modified file 'breezy/shelf_ui.py'
241--- breezy/shelf_ui.py 2017-05-22 00:56:52 +0000
242+++ breezy/shelf_ui.py 2017-06-27 10:27:58 +0000
243@@ -466,7 +466,7 @@
244 if unshelver.message is not None:
245 trace.note(gettext('Message: %s') % unshelver.message)
246 change_reporter = delta._ChangeReporter()
247- merger = unshelver.make_merger(None)
248+ merger = unshelver.make_merger()
249 merger.change_reporter = change_reporter
250 if self.apply_changes:
251 merger.do_merge()
252
253=== modified file 'breezy/tests/per_branch/test_branch.py'
254--- breezy/tests/per_branch/test_branch.py 2017-06-14 23:29:06 +0000
255+++ breezy/tests/per_branch/test_branch.py 2017-06-27 10:27:58 +0000
256@@ -1028,7 +1028,7 @@
257 checkout.commit('bar')
258 tree.lock_write()
259 self.addCleanup(tree.unlock)
260- merger = merge.Merger.from_revision_ids(None, tree,
261+ merger = merge.Merger.from_revision_ids(tree,
262 branch.last_revision(),
263 other_branch=branch)
264 merger.merge_type = merge.Merge3Merger
265
266=== modified file 'breezy/tests/per_merger.py'
267--- breezy/tests/per_merger.py 2017-06-10 00:17:06 +0000
268+++ breezy/tests/per_merger.py 2017-06-27 10:27:58 +0000
269@@ -44,7 +44,7 @@
270 class TestMergeImplementation(TestCaseWithTransport):
271
272 def do_merge(self, target_tree, source_tree, **kwargs):
273- merger = _mod_merge.Merger.from_revision_ids(None,
274+ merger = _mod_merge.Merger.from_revision_ids(
275 target_tree, source_tree.last_revision(),
276 other_branch=source_tree.branch)
277 merger.merge_type=self.merge_type
278
279=== modified file 'breezy/tests/test_merge.py'
280--- breezy/tests/test_merge.py 2017-06-20 00:26:58 +0000
281+++ breezy/tests/test_merge.py 2017-06-27 10:27:58 +0000
282@@ -373,7 +373,7 @@
283
284 def test_weave_cherrypick(self):
285 this_tree, other_tree = self.prepare_cherrypick()
286- merger = _mod_merge.Merger.from_revision_ids(None,
287+ merger = _mod_merge.Merger.from_revision_ids(
288 this_tree, 'rev3b', 'rev2b', other_tree.branch)
289 merger.merge_type = _mod_merge.WeaveMerger
290 merger.do_merge()
291@@ -381,14 +381,14 @@
292
293 def test_weave_cannot_reverse_cherrypick(self):
294 this_tree, other_tree = self.prepare_cherrypick()
295- merger = _mod_merge.Merger.from_revision_ids(None,
296+ merger = _mod_merge.Merger.from_revision_ids(
297 this_tree, 'rev2b', 'rev3b', other_tree.branch)
298 merger.merge_type = _mod_merge.WeaveMerger
299 self.assertRaises(errors.CannotReverseCherrypick, merger.do_merge)
300
301 def test_merge3_can_reverse_cherrypick(self):
302 this_tree, other_tree = self.prepare_cherrypick()
303- merger = _mod_merge.Merger.from_revision_ids(None,
304+ merger = _mod_merge.Merger.from_revision_ids(
305 this_tree, 'rev2b', 'rev3b', other_tree.branch)
306 merger.merge_type = _mod_merge.Merge3Merger
307 merger.do_merge()
308@@ -406,7 +406,7 @@
309 this_tree.lock_write()
310 self.addCleanup(this_tree.unlock)
311
312- merger = _mod_merge.Merger.from_revision_ids(None,
313+ merger = _mod_merge.Merger.from_revision_ids(
314 this_tree, 'rev3b', 'rev2b', other_tree.branch)
315 merger.merge_type = _mod_merge.Merge3Merger
316 merger.do_merge()
317@@ -424,7 +424,7 @@
318 self.build_tree(['a'])
319 tree.add('a')
320 first_rev = tree.commit("added a")
321- merger = _mod_merge.Merger.from_revision_ids(None, tree,
322+ merger = _mod_merge.Merger.from_revision_ids(tree,
323 _mod_revision.NULL_REVISION,
324 first_rev)
325 merger.merge_type = _mod_merge.Merge3Merger
326@@ -444,7 +444,7 @@
327 other_tree.commit('rev2', rev_id='rev2b')
328 this_tree.lock_write()
329 self.addCleanup(this_tree.unlock)
330- merger = _mod_merge.Merger.from_revision_ids(None,
331+ merger = _mod_merge.Merger.from_revision_ids(
332 this_tree, 'rev2b', other_branch=other_tree.branch)
333 merger.merge_type = _mod_merge.Merge3Merger
334 tree_merger = merger.make_merger()
335@@ -467,7 +467,7 @@
336 other_tree.commit('rev2', rev_id='rev2b')
337 this_tree.lock_write()
338 self.addCleanup(this_tree.unlock)
339- merger = _mod_merge.Merger.from_revision_ids(None,
340+ merger = _mod_merge.Merger.from_revision_ids(
341 this_tree, 'rev2b', other_branch=other_tree.branch)
342 merger.merge_type = _mod_merge.Merge3Merger
343 tree_merger = merger.make_merger()
344@@ -497,7 +497,7 @@
345 other_tree.commit('rev2', rev_id='rev2b')
346 this_tree.lock_write()
347 self.addCleanup(this_tree.unlock)
348- merger = _mod_merge.Merger.from_revision_ids(None,
349+ merger = _mod_merge.Merger.from_revision_ids(
350 this_tree, 'rev2b', other_branch=other_tree.branch)
351 merger.merge_type = _mod_merge.Merge3Merger
352 tree_merger = merger.make_merger()
353@@ -516,7 +516,7 @@
354 tree.add('a')
355 first_rev = tree.commit("added a")
356 old_root_id = tree.get_root_id()
357- merger = _mod_merge.Merger.from_revision_ids(None, tree,
358+ merger = _mod_merge.Merger.from_revision_ids(tree,
359 _mod_revision.NULL_REVISION,
360 first_rev)
361 merger.merge_type = _mod_merge.Merge3Merger
362@@ -1270,7 +1270,7 @@
363 mem_tree = memorytree.MemoryTree.create_on_branch(builder.get_branch())
364 mem_tree.lock_write()
365 self.addCleanup(mem_tree.unlock)
366- merger = _mod_merge.Merger.from_revision_ids(None,
367+ merger = _mod_merge.Merger.from_revision_ids(
368 mem_tree, other_revision_id)
369 merger.set_interesting_files(interesting_files)
370 # It seems there is no matching function for set_interesting_ids
371@@ -2072,7 +2072,7 @@
372
373 def do_merge(self, builder, other_revision_id):
374 wt = self.get_wt_from_builder(builder)
375- merger = _mod_merge.Merger.from_revision_ids(None,
376+ merger = _mod_merge.Merger.from_revision_ids(
377 wt, other_revision_id)
378 merger.merge_type = _mod_merge.Merge3Merger
379 return wt, merger.do_merge()
380@@ -2338,8 +2338,7 @@
381 wt.commit('D merges B & C', rev_id='D-id')
382 self.assertEqual('barry', wt.id2path('foo-id'))
383 # Check the output of the Merger object directly
384- merger = _mod_merge.Merger.from_revision_ids(None,
385- wt, 'F-id')
386+ merger = _mod_merge.Merger.from_revision_ids(wt, 'F-id')
387 merger.merge_type = _mod_merge.Merge3Merger
388 merge_obj = merger.make_merger()
389 root_id = wt.path2id('')
390@@ -2394,8 +2393,7 @@
391 wt.commit('F foo => bing', rev_id='F-id')
392
393 # Check the output of the Merger object directly
394- merger = _mod_merge.Merger.from_revision_ids(None,
395- wt, 'E-id')
396+ merger = _mod_merge.Merger.from_revision_ids(wt, 'E-id')
397 merger.merge_type = _mod_merge.Merge3Merger
398 merge_obj = merger.make_merger()
399 # Nothing interesting happened in OTHER relative to BASE
400@@ -2445,8 +2443,7 @@
401 list(wt.iter_changes(wt.basis_tree()))
402 wt.commit('D merges B & C, makes it a file', rev_id='D-id')
403
404- merger = _mod_merge.Merger.from_revision_ids(None,
405- wt, 'E-id')
406+ merger = _mod_merge.Merger.from_revision_ids(wt, 'E-id')
407 merger.merge_type = _mod_merge.Merge3Merger
408 merge_obj = merger.make_merger()
409 entries = list(merge_obj._entries_lca())
410@@ -2660,8 +2657,7 @@
411 wt.branch.set_last_revision_info(2, 'B-id')
412 wt.commit('D', rev_id='D-id', recursive=None)
413
414- merger = _mod_merge.Merger.from_revision_ids(None,
415- wt, 'E-id')
416+ merger = _mod_merge.Merger.from_revision_ids(wt, 'E-id')
417 merger.merge_type = _mod_merge.Merge3Merger
418 merge_obj = merger.make_merger()
419 entries = list(merge_obj._entries_lca())
420@@ -2697,8 +2693,7 @@
421 wt.branch.set_last_revision_info(2, 'B-id')
422 wt.commit('D', rev_id='D-id', recursive=None)
423
424- merger = _mod_merge.Merger.from_revision_ids(None,
425- wt, 'E-id')
426+ merger = _mod_merge.Merger.from_revision_ids(wt, 'E-id')
427 merger.merge_type = _mod_merge.Merge3Merger
428 merge_obj = merger.make_merger()
429 entries = list(merge_obj._entries_lca())
430@@ -2737,8 +2732,7 @@
431 wt.branch.set_last_revision_info(2, 'B-id')
432 wt.commit('D', rev_id='D-id', recursive=None)
433
434- merger = _mod_merge.Merger.from_revision_ids(None,
435- wt, 'E-id')
436+ merger = _mod_merge.Merger.from_revision_ids(wt, 'E-id')
437 merger.merge_type = _mod_merge.Merge3Merger
438 merge_obj = merger.make_merger()
439 entries = list(merge_obj._entries_lca())
440@@ -2782,8 +2776,7 @@
441 wt.branch.set_last_revision_info(2, 'B-id')
442 wt.commit('D', rev_id='D-id', recursive=None)
443
444- merger = _mod_merge.Merger.from_revision_ids(None,
445- wt, 'E-id')
446+ merger = _mod_merge.Merger.from_revision_ids(wt, 'E-id')
447 merger.merge_type = _mod_merge.Merge3Merger
448 merge_obj = merger.make_merger()
449 entries = list(merge_obj._entries_lca())
450
451=== modified file 'breezy/tests/test_merge_core.py'
452--- breezy/tests/test_merge_core.py 2017-06-10 00:52:08 +0000
453+++ breezy/tests/test_merge_core.py 2017-06-27 10:27:58 +0000
454@@ -773,14 +773,14 @@
455 def test_from_revision_ids(self):
456 this, other = self.set_up_trees()
457 self.assertRaises(errors.NoSuchRevision, Merger.from_revision_ids,
458- None, this, 'rev2b')
459+ this, 'rev2b')
460 this.lock_write()
461 self.addCleanup(this.unlock)
462- merger = Merger.from_revision_ids(None, this,
463+ merger = Merger.from_revision_ids(this,
464 'rev2b', other_branch=other.branch)
465 self.assertEqual('rev2b', merger.other_rev_id)
466 self.assertEqual('rev1', merger.base_rev_id)
467- merger = Merger.from_revision_ids(None, this,
468+ merger = Merger.from_revision_ids(this,
469 'rev2b', 'rev2a', other_branch=other.branch)
470 self.assertEqual('rev2a', merger.base_rev_id)
471
472@@ -804,17 +804,14 @@
473 other.branch.repository, 'rev3', 0, 0, 'this')
474 other.lock_read()
475 self.addCleanup(other.unlock)
476- merger, verified = Merger.from_mergeable(this, md,
477- None)
478+ merger, verified = Merger.from_mergeable(this, md)
479 md.patch = None
480- merger, verified = Merger.from_mergeable(this, md,
481- None)
482+ merger, verified = Merger.from_mergeable(this, md)
483 self.assertEqual('inapplicable', verified)
484 self.assertEqual('rev3', merger.other_rev_id)
485 self.assertEqual('rev1', merger.base_rev_id)
486 md.base_revision_id = 'rev2b'
487- merger, verified = Merger.from_mergeable(this, md,
488- None)
489+ merger, verified = Merger.from_mergeable(this, md)
490 self.assertEqual('rev2b', merger.base_rev_id)
491
492 def test_from_mergeable_old_merge_directive(self):
493@@ -823,7 +820,6 @@
494 self.addCleanup(other.unlock)
495 md = merge_directive.MergeDirective.from_objects(
496 other.branch.repository, 'rev3', 0, 0, 'this')
497- merger, verified = Merger.from_mergeable(this, md,
498- None)
499+ merger, verified = Merger.from_mergeable(this, md)
500 self.assertEqual('rev3', merger.other_rev_id)
501 self.assertEqual('rev1', merger.base_rev_id)
502
503=== modified file 'breezy/tests/test_missing.py'
504--- breezy/tests/test_missing.py 2017-06-10 00:17:06 +0000
505+++ breezy/tests/test_missing.py 2017-06-27 10:27:58 +0000
506@@ -41,26 +41,26 @@
507 merger = merger_tree.branch
508 self.assertUnmerged(([], []), original, puller)
509 original_tree.commit('a', rev_id='a')
510- self.assertUnmerged(([('1', 'a')], []), original, puller)
511+ self.assertUnmerged(([('1', 'a', 0)], []), original, puller)
512 puller_tree.pull(original)
513 self.assertUnmerged(([], []), original, puller)
514 merger_tree.pull(original)
515 original_tree.commit('b', rev_id='b')
516 original_tree.commit('c', rev_id='c')
517- self.assertUnmerged(([('2', 'b'), ('3', 'c')], []),
518+ self.assertUnmerged(([('2', 'b', 0), ('3', 'c', 0)], []),
519 original, puller)
520- self.assertUnmerged(([('3', 'c'), ('2', 'b')], []),
521+ self.assertUnmerged(([('3', 'c', 0), ('2', 'b', 0)], []),
522 original, puller, backward=True)
523
524 puller_tree.pull(original)
525 self.assertUnmerged(([], []), original, puller)
526- self.assertUnmerged(([('2', 'b'), ('3', 'c')], []),
527+ self.assertUnmerged(([('2', 'b', 0), ('3', 'c', 0)], []),
528 original, merger)
529 merger_tree.merge_from_branch(original)
530- self.assertUnmerged(([('2', 'b'), ('3', 'c')], []),
531+ self.assertUnmerged(([('2', 'b', 0), ('3', 'c', 0)], []),
532 original, merger)
533 merger_tree.commit('d', rev_id='d')
534- self.assertUnmerged(([], [('2', 'd')]), original, merger)
535+ self.assertUnmerged(([], [('2', 'd', 0)]), original, merger)
536
537 def test_iter_log_revisions(self):
538 base_tree = self.make_branch_and_tree('base')
539@@ -159,17 +159,17 @@
540 rev1 = tree.commit('one')
541 tree2 = tree.controldir.sprout('tree2').open_workingtree()
542 rev2 = tree2.commit('two')
543- self.assertUnmerged([], [('2', rev2)], tree.branch, tree2.branch)
544- self.assertUnmerged([('2', rev2)], [], tree2.branch, tree.branch)
545+ self.assertUnmerged([], [('2', rev2, 0)], tree.branch, tree2.branch)
546+ self.assertUnmerged([('2', rev2, 0)], [], tree2.branch, tree.branch)
547
548 def test_restrict(self):
549 tree = self.make_branch_and_tree('tree')
550 rev1 = tree.commit('one')
551 tree2 = tree.controldir.sprout('tree2').open_workingtree()
552 rev2 = tree2.commit('two')
553- self.assertUnmerged([], [('2', rev2)], tree.branch, tree2.branch)
554+ self.assertUnmerged([], [('2', rev2, 0)], tree.branch, tree2.branch)
555 self.assertUnmerged([], None, tree.branch, tree2.branch, 'local')
556- self.assertUnmerged(None, [('2', rev2)], tree.branch, tree2.branch,
557+ self.assertUnmerged(None, [('2', rev2, 0)], tree.branch, tree2.branch,
558 'remote')
559
560 def test_merged(self):
561@@ -181,8 +181,8 @@
562 tree.merge_from_branch(tree2.branch)
563 rev4 = tree.commit('four')
564
565- self.assertUnmerged([('2', rev4)], [], tree.branch, tree2.branch)
566- self.assertUnmerged([('2', rev4)], [], tree.branch, tree2.branch,
567+ self.assertUnmerged([('2', rev4, 0)], [], tree.branch, tree2.branch)
568+ self.assertUnmerged([('2', rev4, 0)], [], tree.branch, tree2.branch,
569 local_revid_range=(rev4, rev4))
570 self.assertUnmerged([], [], tree.branch, tree2.branch,
571 local_revid_range=(rev1, rev1))
572@@ -239,8 +239,8 @@
573 lrevid2 = local.commit('two')
574 lrevid3 = local.commit('three')
575 lrevid4 = local.commit('four')
576- local_extra = [('2', lrevid2), ('3', lrevid3), ('4', lrevid4)]
577- remote_extra = [('2', rrevid2), ('3', rrevid3), ('4', rrevid4)]
578+ local_extra = [('2', lrevid2, 0), ('3', lrevid3, 0), ('4', lrevid4, 0)]
579+ remote_extra = [('2', rrevid2, 0), ('3', rrevid3, 0), ('4', rrevid4, 0)]
580
581 # control
582 self.assertUnmerged(local_extra, remote_extra,
583@@ -250,32 +250,32 @@
584 remote_revid_range=(None, None))
585
586 # exclude local revisions
587- self.assertUnmerged([('2', lrevid2)], remote_extra,
588+ self.assertUnmerged([('2', lrevid2, 0)], remote_extra,
589 local.branch, remote.branch, local_revid_range=(lrevid2, lrevid2))
590- self.assertUnmerged([('2', lrevid2), ('3', lrevid3)], remote_extra,
591+ self.assertUnmerged([('2', lrevid2, 0), ('3', lrevid3, 0)], remote_extra,
592 local.branch, remote.branch, local_revid_range=(lrevid2, lrevid3))
593- self.assertUnmerged([('2', lrevid2), ('3', lrevid3)], None,
594+ self.assertUnmerged([('2', lrevid2, 0), ('3', lrevid3, 0)], None,
595 local.branch, remote.branch, 'local',
596 local_revid_range=(lrevid2, lrevid3))
597
598 # exclude remote revisions
599- self.assertUnmerged(local_extra, [('2', rrevid2)],
600+ self.assertUnmerged(local_extra, [('2', rrevid2, 0)],
601 local.branch, remote.branch, remote_revid_range=(None, rrevid2))
602- self.assertUnmerged(local_extra, [('2', rrevid2)],
603+ self.assertUnmerged(local_extra, [('2', rrevid2, 0)],
604 local.branch, remote.branch, remote_revid_range=(lrevid1, rrevid2))
605- self.assertUnmerged(local_extra, [('2', rrevid2)],
606+ self.assertUnmerged(local_extra, [('2', rrevid2, 0)],
607 local.branch, remote.branch, remote_revid_range=(rrevid2, rrevid2))
608- self.assertUnmerged(local_extra, [('2', rrevid2), ('3', rrevid3)],
609+ self.assertUnmerged(local_extra, [('2', rrevid2, 0), ('3', rrevid3, 0)],
610 local.branch, remote.branch, remote_revid_range=(None, rrevid3))
611- self.assertUnmerged(local_extra, [('2', rrevid2), ('3', rrevid3)],
612+ self.assertUnmerged(local_extra, [('2', rrevid2, 0), ('3', rrevid3, 0)],
613 local.branch, remote.branch, remote_revid_range=(rrevid2, rrevid3))
614- self.assertUnmerged(local_extra, [('3', rrevid3)],
615+ self.assertUnmerged(local_extra, [('3', rrevid3, 0)],
616 local.branch, remote.branch, remote_revid_range=(rrevid3, rrevid3))
617- self.assertUnmerged(None, [('2', rrevid2), ('3', rrevid3)],
618+ self.assertUnmerged(None, [('2', rrevid2, 0), ('3', rrevid3, 0)],
619 local.branch, remote.branch, 'remote',
620 remote_revid_range=(rrevid2, rrevid3))
621
622 # exclude local and remote revisions
623- self.assertUnmerged([('3', lrevid3)], [('3', rrevid3)],
624+ self.assertUnmerged([('3', lrevid3, 0)], [('3', rrevid3, 0)],
625 local.branch, remote.branch, local_revid_range=(lrevid3, lrevid3),
626 remote_revid_range=(rrevid3, rrevid3))
627
628=== modified file 'breezy/tests/test_transform.py'
629--- breezy/tests/test_transform.py 2017-06-11 02:27:01 +0000
630+++ breezy/tests/test_transform.py 2017-06-27 10:27:58 +0000
631@@ -3230,7 +3230,7 @@
632 preview.delete_contents(file_trans_id)
633 preview.create_file('a\nb\n', file_trans_id)
634 preview_tree = preview.get_preview_tree()
635- merger = Merger.from_revision_ids(None, preview_tree,
636+ merger = Merger.from_revision_ids(preview_tree,
637 child_tree.branch.last_revision(),
638 other_branch=child_tree.branch,
639 tree_branch=work_tree.branch)
640@@ -3249,7 +3249,7 @@
641 tree2 = self.make_branch_and_tree('tree2')
642 tree2.set_root_id('TREE_ROOT')
643 merger = Merger.from_uncommitted(tree2, tt.get_preview_tree(),
644- None, tree.basis_tree())
645+ tree.basis_tree())
646 merger.merge_type = Merge3Merger
647 merger.do_merge()
648
649@@ -3265,9 +3265,8 @@
650 tt.create_file('baz', trans_id)
651 tree2 = tree.controldir.sprout('tree2').open_workingtree()
652 self.build_tree_contents([('tree2/foo', 'qux')])
653- pb = None
654 merger = Merger.from_uncommitted(tree2, tt.get_preview_tree(),
655- pb, tree.basis_tree())
656+ tree.basis_tree())
657 merger.merge_type = Merge3Merger
658 merger.do_merge()
659
660
661=== modified file 'breezy/workingtree.py'
662--- breezy/workingtree.py 2017-06-14 23:29:06 +0000
663+++ breezy/workingtree.py 2017-06-27 10:27:58 +0000
664@@ -955,7 +955,6 @@
665 new_basis_tree,
666 basis_tree,
667 this_tree=self,
668- pb=None,
669 change_reporter=change_reporter,
670 show_base=show_base)
671 basis_root_id = basis_tree.get_root_id()

Subscribers

People subscribed via source and target branches