# HG changeset patch
# User Martin von Zweigbergk <martinv...@google.com>
# Date 1497766187 25200
#      Sat Jun 17 23:09:47 2017 -0700
# Node ID ae7a9461a249b94cf2eb48b1ab93d3ecc15ef17e
# Parent  d8c3f47d162dafa180996d3dfd8b59f1e901735b
rebase: rewrite "x in y.children()" as "y in x.parents()"

children() is slow

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -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()
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to