# HG changeset patch # User Laurent Charignon # Date 1431574212 25200 # Node ID 29be0450b667ddd66a7d1356793f1f40c19fdf33 # Parent 0de132d5328acc43a9f267b559c199cf20e0a362 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. diff -r 0de132d5328a -r 29be0450b667 hgext/record.py --- 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']: