rebase: rewrite "x in y.children()" as "y in x.parents()"
authorMartin von Zweigbergk <martinvonz@google.com>
Sat, 17 Jun 2017 23:09:47 -0700
changeset 32900 07d5a503124c
parent 32899 3980b2e061f0
child 32901 559db66dead5
rebase: rewrite "x in y.children()" as "y in x.parents()" children() is slow
hgext/rebase.py
--- a/hgext/rebase.py	Sat Jun 17 23:09:39 2017 -0700
+++ b/hgext/rebase.py	Sat Jun 17 23:09:47 2017 -0700
@@ -1265,7 +1265,7 @@
                 samebranch = root.branch() == wctx.branch()
             else:
                 samebranch = root.branch() == dest.branch()
-            if not collapse and samebranch and root in dest.children():
+            if not collapse and samebranch and dest in root.parents():
                 # mark the revision as done by setting its new revision
                 # equal to its old (current) revisions
                 state[root.rev()] = root.rev()