diff hgext/histedit.py @ 45577:5c8230ca37f2

merge: replace calls to hg.updaterepo() by merge.update() The former no longer buys us anything. Differential Revision: https://phab.mercurial-scm.org/D9067
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 21 Sep 2020 11:53:44 -0700
parents 47d10ade5bc4
children 1f9736eb0e65
line wrap: on
line diff
--- a/hgext/histedit.py	Mon Sep 21 09:57:29 2020 -0700
+++ b/hgext/histedit.py	Mon Sep 21 11:53:44 2020 -0700
@@ -881,8 +881,7 @@
         return False
 
     def finishfold(self, ui, repo, ctx, oldctx, newnode, internalchanges):
-        parent = ctx.p1().node()
-        hg.updaterepo(repo, parent, overwrite=False)
+        mergemod.update(ctx.p1())
         ### prepare new commit data
         commitopts = {}
         commitopts[b'user'] = ctx.user()
@@ -926,7 +925,7 @@
             )
         if n is None:
             return ctx, []
-        hg.updaterepo(repo, n, overwrite=False)
+        mergemod.update(repo[n])
         replacements = [
             (oldctx.node(), (newnode,)),
             (ctx.node(), (n,)),
@@ -2050,7 +2049,7 @@
 
 def _finishhistedit(ui, repo, state, fm):
     """This action runs when histedit is finishing its session"""
-    hg.updaterepo(repo, state.parentctxnode, overwrite=False)
+    mergemod.update(repo[state.parentctxnode])
 
     mapping, tmpnodes, created, ntm = processreplacement(state)
     if mapping: