diff hggit/git_handler.py @ 634:a836fc8f6c76

git_handler: don't bail on multiple octopus merges in succession Consider two octopus merges, one of which is a child of the other. Without this patch, get_git_parents() called on the second octopus merge checks that each p1 is neither in the middle of an octopus merge nor the end of it. Since the end of the first octopus merge is a p1 of the second one, this asserts. Change the sanity check to only make sure that p1 is not in the middle of an octopus merge.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 11 Feb 2014 22:13:34 -0800 (2014-02-12)
parents 3ff09f0fac7a
children ca7fc2d23a21
line wrap: on
line diff
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -529,7 +529,7 @@
             part = ctx
             while is_octopus_part(part):
                 (p1, p2) = part.parents()
-                assert not is_octopus_part(p1)
+                assert ctx.extra().get('hg-git', None) != 'octopus'
                 parents.append(p1)
                 part = p2
             parents.append(p2)