##// END OF EJS Templates
rebase: extract a variable for a repeated `repo[p1]`...
Martin von Zweigbergk -
r44553:521b4e3a default
parent child Browse files
Show More
@@ -1469,11 +1469,12 b' def rebasenode(repo, rev, p1, base, coll'
1469 1469 """Rebase a single revision rev on top of p1 using base as merge ancestor"""
1470 1470 # Merge phase
1471 1471 # Update to destination and merge it with local
1472 p1ctx = repo[p1]
1472 1473 if wctx.isinmemory():
1473 wctx.setbase(repo[p1])
1474 wctx.setbase(p1ctx)
1474 1475 else:
1475 1476 if repo[b'.'].rev() != p1:
1476 repo.ui.debug(b" update to %d:%s\n" % (p1, repo[p1]))
1477 repo.ui.debug(b" update to %d:%s\n" % (p1, p1ctx))
1477 1478 mergemod.update(repo, p1, branchmerge=False, force=True)
1478 1479 else:
1479 1480 repo.ui.debug(b" already in destination\n")
General Comments 0
You need to be logged in to leave comments. Login now