Rev 3522: Add a test which shows a failing numbering. in http://bzr.arbash-meinel.com/branches/bzr/1.6-dev/lazy_revno
John Arbash Meinel
john at arbash-meinel.com
Thu Aug 7 19:24:57 BST 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.6-dev/lazy_revno
------------------------------------------------------------
revno: 3522
revision-id: john at arbash-meinel.com-20080807182449-q5d7119tdkitmayx
parent: john at arbash-meinel.com-20080807174956-38x3ffhebvvn27ov
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: lazy_revno
timestamp: Thu 2008-08-07 13:24:49 -0500
message:
Add a test which shows a failing numbering.
Basically, with a staging branch, its base is old enough that we
filter it out when numbering.
We can't just remove the left-hand parent, because that would make it look
like we *descended* from the feature branch (and give wrong numberings)
But if we filter out *all* parents, then it looks like the feature was not merged.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_graph.py'
--- a/bzrlib/tests/test_graph.py 2008-08-06 18:16:13 +0000
+++ b/bzrlib/tests/test_graph.py 2008-08-07 18:24:49 +0000
@@ -698,6 +698,45 @@
'v':['c'], 'w':['v'], 'x':['e'], 'y':['f'], 'z':['j'],
}
+# A staging branch continually merges feature branches, and then gets merged
+# back into mainline
+#
+# NULL_REVISION
+# |
+# a
+# |
+# b
+# |\
+# c m # feature 1, has 2 commits
+# | \
+# d n
+# |\ /
+# | y # staging begins, merges feature1, and sends it to trunk
+# |/ \ # 'y' should not be interesting when numbering 'q'
+# e |
+# | |
+# f |
+# |\ |
+# g o | # feature 2 begins, and is merged directly
+# |/| |
+# h p | # feature 2 continues
+# | | |
+# i q |
+# | \|
+# | z # And feature 2 is merged via staging
+# | /
+# | /
+# |/
+# j
+#
+staging = {'a':[NULL_REVISION], 'b':['a'], 'c':['b'], 'd':['c'],
+ 'e':['d', 'y'], 'f':['e'], 'g':['f'], 'h':['g', 'o'], 'i':['h'],
+ 'j':['i', 'z'],
+ 'm':['b'], 'n':['m'],
+ 'o':['f'], 'p':['o'], 'q':['p'],
+ 'y':['d', 'n'], 'z':['y', 'q']
+}
+
class InstrumentedParentsProvider(object):
@@ -1782,6 +1821,9 @@
self.assertAllDottedRevno(alt_with_ghost, 'a')
self.assertAllDottedRevno(alt_with_ghost, 'c')
+ def test_get_dotted_revno_staging(self):
+ self.assertAllDottedRevno(staging, 'j')
+
def test_get_dotted_revno_with_shortcut(self):
self.assertAllDottedRevno(shortcut_extra_root, 'f')
More information about the bazaar-commits
mailing list