--- a/mercurial/cmd_impls/graft.py Wed Nov 20 02:10:43 2024 +0100
+++ b/mercurial/cmd_impls/graft.py Wed Nov 20 02:37:28 2024 +0100
@@ -115,6 +115,7 @@
b'date',
b'user',
b'log',
+ b'no_commit',
):
v = opts.get(o.decode('ascii'))
# if statedata is already set, it comes from --continue and test says
@@ -216,8 +217,6 @@
if not revs:
return None
- if opts.get('no_commit'):
- statedata[b'no_commit'] = True
if opts.get('base'):
statedata[b'base'] = opts['base']
@@ -285,7 +284,7 @@
cont = False
# commit if --no-commit is false
- if not opts.get('no_commit'):
+ if not statedata.get(b'no_commit'):
node = repo.commit(
text=message, user=user, date=date, extra=extra, editor=editor
)