Rev 6016: Simplify the tests even further. in file:///home/vila/src/bzr/reviews/merge-prefers-this-root/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Jul 7 09:09:29 UTC 2011
At file:///home/vila/src/bzr/reviews/merge-prefers-this-root/
------------------------------------------------------------
revno: 6016
revision-id: v.ladeuil+lp at free.fr-20110707090929-9fjheau8siasz3g8
parent: v.ladeuil+lp at free.fr-20110707085935-pj1cze35av1ndp04
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: merge-prefers-this-root
timestamp: Thu 2011-07-07 11:09:29 +0200
message:
Simplify the tests even further.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_merge.py'
--- a/bzrlib/tests/test_merge.py 2011-07-07 08:59:35 +0000
+++ b/bzrlib/tests/test_merge.py 2011-07-07 09:09:29 +0000
@@ -137,11 +137,9 @@
def test_merge_preview_unrelated_retains_root(self):
wt = self.make_branch_and_tree('tree')
- null_tree = wt.basis_tree()
- wt.commit('add root to tree')
other_tree = self.make_branch_and_tree('other')
other_tree.commit('add root in other')
- merger = _mod_merge.Merge3Merger(wt, wt, null_tree, other_tree,
+ merger = _mod_merge.Merge3Merger(wt, wt, wt.basis_tree(), other_tree,
this_branch=wt.branch,
do_merge=False)
with merger.make_preview_transform() as tt:
@@ -150,11 +148,11 @@
def test_merge_unrelated_retains_root(self):
wt = self.make_branch_and_tree('tree')
- wt.commit('add root to tree')
root_id_before_merge = wt.get_root_id()
other_tree = self.make_branch_and_tree('other')
+ # Do a commit so there is something to merge
other_tree.commit('add root to other')
- self.debug()
+ self.assertNotEquals(root_id_before_merge, other_tree.get_root_id())
wt.merge_from_branch(other_tree.branch, from_revision='null:',
to_revision=other_tree.last_revision())
self.assertEqual(root_id_before_merge, wt.get_root_id())
More information about the bazaar-commits
mailing list