diff hgext/fix.py @ 44271:c791ed6a2154

merge: introduce a revert_to() for that use-case In the same vein as the previous patch. Differential Revision: https://phab.mercurial-scm.org/D7901
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 15 Jan 2020 14:47:38 -0800
parents 84a0102c05c7
children 40f4a75938ba
line wrap: on
line diff
--- a/hgext/fix.py	Wed Jan 15 15:30:25 2020 -0800
+++ b/hgext/fix.py	Wed Jan 15 14:47:38 2020 -0800
@@ -735,15 +735,7 @@
 
     wctx = context.overlayworkingctx(repo)
     wctx.setbase(repo[newp1node])
-    merge.update(
-        repo,
-        ctx.rev(),
-        branchmerge=False,
-        force=True,
-        ancestor=p1rev,
-        mergeancestor=False,
-        wc=wctx,
-    )
+    merge.revert_to(ctx, wc=wctx)
     copies.graftcopies(wctx, ctx, ctx.p1())
 
     for path in filedata.keys():