comparison hgext/rebase.py @ 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 517841766994
children 070920db8b87
comparison
equal deleted inserted replaced
32899:3980b2e061f0 32900:07d5a503124c
1263 if dest == wctx.p1(): 1263 if dest == wctx.p1():
1264 # when rebasing to '.', it will use the current wd branch name 1264 # when rebasing to '.', it will use the current wd branch name
1265 samebranch = root.branch() == wctx.branch() 1265 samebranch = root.branch() == wctx.branch()
1266 else: 1266 else:
1267 samebranch = root.branch() == dest.branch() 1267 samebranch = root.branch() == dest.branch()
1268 if not collapse and samebranch and root in dest.children(): 1268 if not collapse and samebranch and dest in root.parents():
1269 # mark the revision as done by setting its new revision 1269 # mark the revision as done by setting its new revision
1270 # equal to its old (current) revisions 1270 # equal to its old (current) revisions
1271 state[root.rev()] = root.rev() 1271 state[root.rev()] = root.rev()
1272 repo.ui.debug('source is a child of destination\n') 1272 repo.ui.debug('source is a child of destination\n')
1273 continue 1273 continue