##// END OF EJS Templates
cleanup: pass in overwrite flag to hg.updaterepo() as named argument...
Yuya Nishihara -
r38527:39db5a01 default
parent child Browse files
Show More
@@ -784,7 +784,7 b' class fold(histeditaction):'
784
784
785 def finishfold(self, ui, repo, ctx, oldctx, newnode, internalchanges):
785 def finishfold(self, ui, repo, ctx, oldctx, newnode, internalchanges):
786 parent = ctx.parents()[0].node()
786 parent = ctx.parents()[0].node()
787 hg.updaterepo(repo, parent, False)
787 hg.updaterepo(repo, parent, overwrite=False)
788 ### prepare new commit data
788 ### prepare new commit data
789 commitopts = {}
789 commitopts = {}
790 commitopts['user'] = ctx.user()
790 commitopts['user'] = ctx.user()
@@ -815,7 +815,7 b' class fold(histeditaction):'
815 skipprompt=self.skipprompt())
815 skipprompt=self.skipprompt())
816 if n is None:
816 if n is None:
817 return ctx, []
817 return ctx, []
818 hg.updaterepo(repo, n, False)
818 hg.updaterepo(repo, n, overwrite=False)
819 replacements = [(oldctx.node(), (newnode,)),
819 replacements = [(oldctx.node(), (newnode,)),
820 (ctx.node(), (n,)),
820 (ctx.node(), (n,)),
821 (newnode, (n,)),
821 (newnode, (n,)),
@@ -1177,7 +1177,7 b' def _continuehistedit(ui, repo, state):'
1177
1177
1178 def _finishhistedit(ui, repo, state, fm):
1178 def _finishhistedit(ui, repo, state, fm):
1179 """This action runs when histedit is finishing its session"""
1179 """This action runs when histedit is finishing its session"""
1180 hg.updaterepo(repo, state.parentctxnode, False)
1180 hg.updaterepo(repo, state.parentctxnode, overwrite=False)
1181
1181
1182 mapping, tmpnodes, created, ntm = processreplacement(state)
1182 mapping, tmpnodes, created, ntm = processreplacement(state)
1183 if mapping:
1183 if mapping:
@@ -623,7 +623,7 b' class rebaseruntime(object):'
623 newwd = self.originalwd
623 newwd = self.originalwd
624 if newwd not in [c.rev() for c in repo[None].parents()]:
624 if newwd not in [c.rev() for c in repo[None].parents()]:
625 ui.note(_("update back to initial working directory parent\n"))
625 ui.note(_("update back to initial working directory parent\n"))
626 hg.updaterepo(repo, newwd, False)
626 hg.updaterepo(repo, newwd, overwrite=False)
627
627
628 collapsedas = None
628 collapsedas = None
629 if self.collapsef and not self.keepf:
629 if self.collapsef and not self.keepf:
@@ -709,7 +709,7 b' def unshelvecontinue(ui, repo, state, op'
709 state.nodestoremove.append(newnode)
709 state.nodestoremove.append(newnode)
710 shelvectx = repo[newnode]
710 shelvectx = repo[newnode]
711
711
712 hg.updaterepo(repo, pendingctx.node(), False)
712 hg.updaterepo(repo, pendingctx.node(), overwrite=False)
713
713
714 if repo.vfs.exists('unshelverebasestate'):
714 if repo.vfs.exists('unshelverebasestate'):
715 repo.vfs.rename('unshelverebasestate', 'rebasestate')
715 repo.vfs.rename('unshelverebasestate', 'rebasestate')
@@ -2451,7 +2451,7 b' def _abortgraft(ui, repo, graftstate):'
2451
2451
2452 if cleanup:
2452 if cleanup:
2453 with repo.wlock(), repo.lock():
2453 with repo.wlock(), repo.lock():
2454 hg.updaterepo(repo, startctx.node(), True)
2454 hg.updaterepo(repo, startctx.node(), overwrite=True)
2455 # stripping the new nodes created
2455 # stripping the new nodes created
2456 strippoints = [c.node() for c in repo.set("roots(%ld)",
2456 strippoints = [c.node() for c in repo.set("roots(%ld)",
2457 newnodes)]
2457 newnodes)]
@@ -2460,7 +2460,7 b' def _abortgraft(ui, repo, graftstate):'
2460 if not cleanup:
2460 if not cleanup:
2461 # we don't update to the startnode if we can't strip
2461 # we don't update to the startnode if we can't strip
2462 startctx = repo['.']
2462 startctx = repo['.']
2463 hg.updaterepo(repo, startctx.node(), True)
2463 hg.updaterepo(repo, startctx.node(), overwrite=True)
2464
2464
2465 ui.status(_("graft aborted\n"))
2465 ui.status(_("graft aborted\n"))
2466 ui.status(_("working directory is now at %s\n") % startctx.hex()[:12])
2466 ui.status(_("working directory is now at %s\n") % startctx.hex()[:12])
@@ -2480,7 +2480,7 b' def _stopgraft(ui, repo, graftstate):'
2480 if not graftstate.exists():
2480 if not graftstate.exists():
2481 raise error.Abort(_("no interrupted graft found"))
2481 raise error.Abort(_("no interrupted graft found"))
2482 pctx = repo['.']
2482 pctx = repo['.']
2483 hg.updaterepo(repo, pctx.node(), True)
2483 hg.updaterepo(repo, pctx.node(), overwrite=True)
2484 graftstate.delete()
2484 graftstate.delete()
2485 ui.status(_("stopped the interrupted graft\n"))
2485 ui.status(_("stopped the interrupted graft\n"))
2486 ui.status(_("working directory is now at %s\n") % pctx.hex()[:12])
2486 ui.status(_("working directory is now at %s\n") % pctx.hex()[:12])
General Comments 0
You need to be logged in to leave comments. Login now