Mercurial > hg-stable
changeset 25223:29be0450b667
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.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Wed, 13 May 2015 20:30:12 -0700 |
parents | 0de132d5328a |
children | d032f57936f5 |
files | hgext/record.py |
diffstat | 1 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/record.py Thu Apr 09 17:14:35 2015 -0700 +++ b/hgext/record.py Wed May 13 20:30:12 2015 -0700 @@ -54,7 +54,12 @@ This command is not available when committing a merge.''' opts["interactive"] = True - commands.commit(ui, repo, *pats, **opts) + backup = ui.backupconfig('experimental', 'crecord') + try: + ui.setconfig('experimental', 'crecord', False, 'record') + commands.commit(ui, repo, *pats, **opts) + finally: + ui.restoreconfig(backup) def qrefresh(origfn, ui, repo, *pats, **opts): if not opts['interactive']: @@ -96,8 +101,13 @@ opts['checkname'] = False mq.new(ui, repo, patch, *pats, **opts) - cmdutil.dorecord(ui, repo, committomq, 'qnew', False, - cmdutil.recordfilter, *pats, **opts) + backup = ui.backupconfig('experimental', 'crecord') + try: + ui.setconfig('experimental', 'crecord', False, 'record') + cmdutil.dorecord(ui, repo, committomq, 'qnew', False, + cmdutil.recordfilter, *pats, **opts) + finally: + ui.restoreconfig(backup) def qnew(origfn, ui, repo, patch, *args, **opts): if opts['interactive']: