diff mercurial/cmd_impls/graft.py @ 52365:da216ed31c3d

graft: explicitly pass the "tool" argument That one is not preserved in the statefile, so we can explicitly pass it as argument.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 20 Nov 2024 04:13:13 +0100
parents 8d7029218a61
children 77cb5d8643b3
line wrap: on
line diff
--- a/mercurial/cmd_impls/graft.py	Wed Nov 20 02:37:37 2024 +0100
+++ b/mercurial/cmd_impls/graft.py	Wed Nov 20 04:13:13 2024 +0100
@@ -220,7 +220,8 @@
             return None
 
     dry_run = bool(opts.get("dry_run"))
-    return "GRAFT", [graftstate, statedata, revs, editor, cont, dry_run, opts]
+    tool = opts.get('tool', b'')
+    return "GRAFT", [graftstate, statedata, revs, editor, cont, dry_run, tool]
 
 
 def _graft_revisions(
@@ -232,7 +233,7 @@
     editor,
     cont=False,
     dry_run=False,
-    opts,
+    tool=b'',
 ):
     """actually graft some revisions"""
     for pos, ctx in enumerate(repo.set(b"%ld", revs)):
@@ -264,7 +265,7 @@
         # we don't merge the first commit when continuing
         if not cont:
             # perform the graft merge with p1(rev) as 'ancestor'
-            overrides = {(b'ui', b'forcemerge'): opts.get('tool', b'')}
+            overrides = {(b'ui', b'forcemerge'): tool}
             if b'base' in statedata:
                 base = repo[statedata[b'base']]
             else: