diff --git a/hgext/record.py b/hgext/record.py --- a/hgext/record.py +++ b/hgext/record.py @@ -93,7 +93,9 @@ def qrecord(ui, repo, patch, *pats, **op See :hg:`help qnew` & :hg:`help record` for more information and usage. ''' + return _qrecord('qnew', ui, repo, patch, *pats, **opts) +def _qrecord(cmdsuggest, ui, repo, patch, *pats, **opts): try: mq = extensions.find('mq') except KeyError: @@ -108,14 +110,14 @@ def qrecord(ui, repo, patch, *pats, **op backup = ui.backupconfig('experimental', 'crecord') try: ui.setconfig('experimental', 'crecord', False, 'record') - cmdutil.dorecord(ui, repo, committomq, 'qnew', False, + cmdutil.dorecord(ui, repo, committomq, cmdsuggest, False, cmdutil.recordfilter, *pats, **opts) finally: ui.restoreconfig(backup) def qnew(origfn, ui, repo, patch, *args, **opts): if opts['interactive']: - return qrecord(ui, repo, patch, *args, **opts) + return _qrecord(None, ui, repo, patch, *args, **opts) return origfn(ui, repo, patch, *args, **opts) diff --git a/tests/test-mq-qrefresh-interactive.t b/tests/test-mq-qrefresh-interactive.t --- a/tests/test-mq-qrefresh-interactive.t +++ b/tests/test-mq-qrefresh-interactive.t @@ -123,6 +123,12 @@ Base commit $ hg add 1.txt 2.txt dir/a.txt $ hg commit -m aaa + $ hg qrecord --config ui.interactive=false patch + abort: running non-interactively, use qnew instead + [255] + $ hg qnew -i --config ui.interactive=false patch + abort: running non-interactively + [255] $ hg qnew -d '0 0' patch Changing files