# HG changeset patch # User Pierre-Yves David # Date 2024-11-20 03:23:45 # Node ID 0b52283d50bb14942e8a47414dc24845b63e4dae # Parent 77cb5d8643b335b067a7a97c3c3bd998b84e357f graft: get the editor later We don't use it in that function, so I would rather have it close to the return. diff --git a/mercurial/cmd_impls/graft.py b/mercurial/cmd_impls/graft.py --- a/mercurial/cmd_impls/graft.py +++ b/mercurial/cmd_impls/graft.py @@ -46,8 +46,6 @@ def _process_args(ui, repo, *revs, **opt cmdutil.resolve_commit_options(ui, opts) - editor = cmdutil.getcommiteditor(editform=b'graft', **opts) - cmdutil.check_at_most_one_arg(opts, 'abort', 'stop', 'continue') cont = False @@ -220,6 +218,7 @@ def _process_args(ui, repo, *revs, **opt if not revs: return "ERROR", None, None + editor = cmdutil.getcommiteditor(editform=b'graft', **opts) dry_run = bool(opts.get("dry_run")) tool = opts.get('tool', b'') return "GRAFT", graftstate, (statedata, revs, editor, cont, dry_run, tool)