Rev 105: Slightly more complex case, where we have a LH that is merged, but still have an RH to consider. in http://bzr.arbash-meinel.com/branches/bzr/history_db/tip_numbering
John Arbash Meinel
john at arbash-meinel.com
Fri Apr 16 21:28:11 BST 2010
At http://bzr.arbash-meinel.com/branches/bzr/history_db/tip_numbering
------------------------------------------------------------
revno: 105
revision-id: john at arbash-meinel.com-20100416202747-smljmr1l2waogbdw
parent: john at arbash-meinel.com-20100416201711-3hntscd7dvobd2fe
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: tip_numbering
timestamp: Fri 2010-04-16 15:27:47 -0500
message:
Slightly more complex case, where we have a LH that is merged, but still have an RH to consider.
-------------- next part --------------
=== modified file 'test_importer.py'
--- a/test_importer.py 2010-04-16 19:27:41 +0000
+++ b/test_importer.py 2010-04-16 20:27:47 +0000
@@ -155,28 +155,27 @@
# Simple ancestry:
# A-. 1--------.
# |\ \ | \ \
- # | B C | 2.1.1 2.2.1
- # | |/| | | / |
- # | D E | 2.1.2 2.3.1
- # | |/| | | / |
- # | F G | 2.1.3 2.4.1
+ # | B D | 2.1.1 3.2.1
+ # |/|/| |/ | / |
+ # C E F 2 3.1.1 3.3.1
+ # | |/| | | / |
+ # | G H | 3.1.2 3.4.1
# | |/ | | /
- # | H | 2.1.4
+ # | I | 3.1.3
# |/ |/
- # I 2
- #
- # Both C and D refer to 'G' but that revision isn't actually present
+ # J 3
ancestry = {'A': (),
'B': ('A',),
- 'C': ('A',),
- 'D': ('B', 'C'),
- 'E': ('C',),
- 'F': ('D', 'E'),
- 'G': ('E',),
- 'H': ('F', 'G'),
- 'I': ('A', 'H'),
+ 'C': ('A', 'B'),
+ 'D': ('A',),
+ 'E': ('B', 'D'),
+ 'F': ('D',),
+ 'G': ('E', 'F'),
+ 'H': ('F'),
+ 'I': ('G', 'H'),
+ 'J': ('C', 'I'),
}
- return MockBranch(ancestry, 'I')
+ return MockBranch(ancestry, 'J')
def grab_interesting_ids(self, rev_id_to_db_id):
for rev_id in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ':
@@ -771,15 +770,16 @@
def test_multi_merge_sort(self):
b = self.make_multi_merge()
- inc_merger = self.make_inc_merger(b, None, 'I')
+ inc_merger = self.make_inc_merger(b, None, 'J')
res = inc_merger.topo_order()
- self.assertEqual([(self.I_id, (2,), 0, False),
- (self.H_id, (2,1,4), 1, False),
- (self.G_id, (2,4,1), 2, True),
- (self.F_id, (2,1,3), 1, False),
- (self.E_id, (2,3,1), 2, True),
- (self.D_id, (2,1,2), 1, False),
- (self.C_id, (2,2,1), 2, True),
+ self.assertEqual([(self.J_id, (3,), 0, False),
+ (self.I_id, (3,1,3), 1, False),
+ (self.H_id, (3,4,1), 2, True),
+ (self.G_id, (3,1,2), 1, False),
+ (self.F_id, (3,3,1), 2, True),
+ (self.E_id, (3,1,1), 1, False),
+ (self.D_id, (3,2,1), 2, True),
+ (self.C_id, (2,), 0, False),
(self.B_id, (2,1,1), 1, True),
(self.A_id, (1,), 0, True),
], [(n.key, n.revno, n.merge_depth, n.end_of_merge)
More information about the bazaar-commits
mailing list