# HG changeset patch # User Martin von Zweigbergk # Date 1497766187 25200 # Node ID 07d5a503124caed05e1300a5208240764882c831 # Parent 3980b2e061f0f326df7649701f13a4f6b85821c5 rebase: rewrite "x in y.children()" as "y in x.parents()" children() is slow diff -r 3980b2e061f0 -r 07d5a503124c 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()