Rev 5560: Another possible edge case, multiple parent revs from the master. in http://bazaar.launchpad.net/~jameinel/bzr/2.3-commit-to-stacked
John Arbash Meinel
john at arbash-meinel.com
Fri Dec 3 20:02:46 GMT 2010
At http://bazaar.launchpad.net/~jameinel/bzr/2.3-commit-to-stacked
------------------------------------------------------------
revno: 5560
revision-id: john at arbash-meinel.com-20101203200232-22082dxipu67v89m
parent: john at arbash-meinel.com-20101203200029-c948k8248eqcbops
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.3-commit-to-stacked
timestamp: Fri 2010-12-03 14:02:32 -0600
message:
Another possible edge case, multiple parent revs from the master.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_repository_reference/test_commit_with_stacking.py'
--- a/bzrlib/tests/per_repository_reference/test_commit_with_stacking.py 2010-12-03 20:00:29 +0000
+++ b/bzrlib/tests/per_repository_reference/test_commit_with_stacking.py 2010-12-03 20:02:32 +0000
@@ -74,6 +74,24 @@
self.assertEqual(sorted(all_keys),
sorted(stacked_only_repo.inventories.get_parent_map(all_keys)))
+ def test_merge_from_master(self):
+ base_tree, stacked_tree = self.make_stacked_target()
+ self.build_tree_contents([('base/f1.txt', 'new content\n')])
+ base_tree.commit('second base', 'base2-rev-id')
+ stacked_tree.merge_from_branch(base_tree.branch)
+ stacked_tree.commit('merge', rev_id='merged-rev-id')
+ r1_key = ('initial-rev-id',)
+ r2_key = ('base2-rev-id',)
+ r3_key = ('merged-rev-id',)
+ all_keys = [r1_key, r2_key, r3_key]
+ # We shouldn't have any of the base revisions in the local repo, but we
+ # should have both base inventories.
+ stacked_only_repo = stacked_tree.bzrdir.open_repository()
+ self.assertEqual(sorted([r3_key]),
+ sorted(stacked_only_repo.revisions.get_parent_map(all_keys)))
+ self.assertEqual(sorted(all_keys),
+ sorted(stacked_only_repo.inventories.get_parent_map(all_keys)))
+
def test_multi_stack(self):
"""base + stacked + stacked-on-stacked"""
base_tree, stacked_tree = self.make_stacked_target()
More information about the bazaar-commits
mailing list