##// END OF EJS Templates
graft: extract `repo['.']` to local variable...
Martin von Zweigbergk -
r44236:fb07126d default
parent child Browse files
Show More
@@ -2605,7 +2605,8 b' def graft('
2605 # to copy commits), and 2) informs update that the incoming changes are
2605 # to copy commits), and 2) informs update that the incoming changes are
2606 # newer than the destination so it doesn't prompt about "remote changed foo
2606 # newer than the destination so it doesn't prompt about "remote changed foo
2607 # which local deleted".
2607 # which local deleted".
2608 mergeancestor = repo.changelog.isancestor(repo[b'.'].node(), ctx.node())
2608 pctx = repo[b'.']
2609 mergeancestor = repo.changelog.isancestor(pctx.node(), ctx.node())
2609
2610
2610 stats = update(
2611 stats = update(
2611 repo,
2612 repo,
@@ -2627,7 +2628,7 b' def graft('
2627 pother = parents[0].node()
2628 pother = parents[0].node()
2628
2629
2629 with repo.dirstate.parentchange():
2630 with repo.dirstate.parentchange():
2630 repo.setparents(repo[b'.'].node(), pother)
2631 repo.setparents(pctx.node(), pother)
2631 repo.dirstate.write(repo.currenttransaction())
2632 repo.dirstate.write(repo.currenttransaction())
2632 # fix up dirstate for copies and renames
2633 # fix up dirstate for copies and renames
2633 copies.duplicatecopies(repo, repo[None], ctx.rev(), base.rev())
2634 copies.duplicatecopies(repo, repo[None], ctx.rev(), base.rev())
General Comments 0
You need to be logged in to leave comments. Login now