[PATCH 5 of 6 v2] import: refactor exact handling and split between exact and usenode
Yuya Nishihara
yuya at tcha.org
Sun Jan 3 14:47:41 UTC 2016
On Thu, 31 Dec 2015 00:47:19 -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1451509773 0
> # Wed Dec 30 21:09:33 2015 +0000
> # Node ID 37c3ba3d2f3678daa5439947f20d89496282d8b0
> # Parent f157383b6e9967a6c4a43ee30679f4eba6a1d6c5
> import: refactor exact handling and split between exact and usenode
>
> The usenode flag identifies when parentnode is being used.
> Distinct from when exact might error if the commit isn't perfect.
>
> diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
> --- a/mercurial/cmdutil.py
> +++ b/mercurial/cmdutil.py
> @@ -887,6 +887,8 @@
> return (None, None, False)
>
> rejects = False
> + exact = opts.get('exact')
> + usenode = exact
I expected that these flags would have different values, but the next patch
didn't touch them. So I couldn't figure out the purpose of this patch.
exact = opts.get('exact') and nodeid
usenode = opts.get('exact')
> editform = mergeeditform(repo[None], 'import.normal')
> - if opts.get('exact'):
> + if usenode:
> editor = None
> else:
> editor = getcommiteditor(editform=editform, **opts)
I think editor is disabled because it needs an "exact" commit message,
not because of "usenode".
More information about the Mercurial-devel
mailing list