diff hgext/transplant.py @ 45556:03726f5b6092

merge: use merge.clean_update() when applicable We have had this higher-level function (higher than `merge.update()`, that is) for a while. Let's simply some callers by using it. I don't know why I didn't do this when I introduced the function. After this patch, there are no remaining callers that call `hg.updaterepo()` with `overwrite=True`. We'll clean that up soon. Differential Revision: https://phab.mercurial-scm.org/D9063
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 21 Sep 2020 10:09:39 -0700
parents 9d2b2df2c2ba
children 2c86b9587740
line wrap: on
line diff
--- a/hgext/transplant.py	Fri Sep 18 15:03:06 2020 -0700
+++ b/hgext/transplant.py	Mon Sep 21 10:09:39 2020 -0700
@@ -476,7 +476,7 @@
         """logic to stop an interrupted transplant"""
         if self.canresume():
             startctx = repo[b'.']
-            hg.updaterepo(repo, startctx.node(), overwrite=True)
+            merge.clean_update(startctx)
             ui.status(_(b"stopped the interrupted transplant\n"))
             ui.status(
                 _(b"working directory is now at %s\n") % startctx.hex()[:12]