[PATCH] record: make hg record always use the non curses interface
pierre-yves.david at ens-lyon.org
Wed May 13 18:01:29 CDT 2015
On 05/13/2015 01:14 PM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1431547296 25200
> # Wed May 13 13:01:36 2015 -0700
> # Node ID b7c2ccb01b9c096d602c8dc6c37ba2331d87f737
> # Parent 7c324f65e4efb3310f7664df3da94363bef76765
> record: make hg record always use the non curses interface
> Before this patch, hg record was running hg commit -i, therefore with the
> experimental.crecord=True flag, hg record was actually launching the curses
> record interface. Some of our users could be confused by that.
> This patch makes the hg record command set this flag to False, ensuring that
> hg record never shows the curses interface.
> commit -i, shelve -i and revert -i remain unchanged and use the curses
> interface if the experimental.crecord flag is set
I think this patch intend make sense. We have been shipping record for a
long time and keep backward compat here is important.
However I hope for a clear future were the best availabel ui (hopefully
curse) could be used by commit -i by default.
> diff --git a/hgext/record.py b/hgext/record.py
> --- a/hgext/record.py
> +++ b/hgext/record.py
> @@ -49,6 +49,7 @@
> This command is not available when committing a merge.'''
> + ui.setconfig('experimental', 'crecord', False)
> opts["interactive"] = True
> commands.commit(ui, repo, *pats, **opts)
You cannot just go around and overwrite config variable. (Because
command should not have config side effect). use the
Feel free of adding a context manager for that.
More information about the Mercurial-devel