# HG changeset patch # User Laurent Charignon # Date 2015-05-14 03:30:12 # 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 --git a/hgext/record.py b/hgext/record.py --- a/hgext/record.py +++ b/hgext/record.py @@ -54,7 +54,12 @@ def record(ui, repo, *pats, **opts): 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 @@ def qrecord(ui, repo, patch, *pats, **op 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']: