changeset 32900:07d5a503124c

rebase: rewrite "x in y.children()" as "y in x.parents()" children() is slow
author Martin von Zweigbergk <martinvonz@google.com>
date Sat, 17 Jun 2017 23:09:47 -0700
parents 3980b2e061f0
children 559db66dead5
files hgext/rebase.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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()