##// END OF EJS Templates
rebase: use dirstateguard instead of dirstate.invalidate...
FUJIWARA Katsunori -
r24998:c8a97fa7 default
parent child Browse files
Show More
@@ -530,10 +530,9 b' def concludenode(repo, rev, p1, p2, comm'
530 530 '''Commit the wd changes with parents p1 and p2. Reuse commit info from rev
531 531 but also store useful information in extra.
532 532 Return node of committed revision.'''
533 dsguard = cmdutil.dirstateguard(repo, 'rebase')
533 534 try:
534 repo.dirstate.beginparentchange()
535 535 repo.setparents(repo[p1].node(), repo[p2].node())
536 repo.dirstate.endparentchange()
537 536 ctx = repo[rev]
538 537 if commitmsg is None:
539 538 commitmsg = ctx.description()
@@ -552,11 +551,10 b' def concludenode(repo, rev, p1, p2, comm'
552 551 repo.ui.restoreconfig(backup)
553 552
554 553 repo.dirstate.setbranch(repo[newnode].branch())
554 dsguard.close()
555 555 return newnode
556 except util.Abort:
557 # Invalidate the previous setparents
558 repo.dirstate.invalidate()
559 raise
556 finally:
557 release(dsguard)
560 558
561 559 def rebasenode(repo, rev, p1, base, state, collapse, target):
562 560 'Rebase a single revision rev on top of p1 using base as merge ancestor'
@@ -1017,7 +1017,7 b' that time)'
1017 1017
1018 1018 $ hg -R no-largefiles -q pull --rebase
1019 1019 Invoking status precommit hook
1020 ? normal3
1020 M normal3
1021 1021
1022 1022 (test reverting)
1023 1023
General Comments 0
You need to be logged in to leave comments. Login now