Patchwork [4,of,5] record: omit meaningless 'qrefresh' suggestion at 'hg qrefresh -i'

login
register
mail settings
Submitter Katsunori FUJIWARA
Date July 14, 2015, 7:58 p.m.
Message ID <b7be795042aa172e56d5.1436903906@feefifofum>
Download mbox | patch
Permalink /patch/9981/
State Accepted
Commit 08f2177b15c7a0d2408ba818efd0a8297702039b
Headers show

Comments

Katsunori FUJIWARA - July 14, 2015, 7:58 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1436903158 -32400
#      Wed Jul 15 04:45:58 2015 +0900
# Node ID b7be795042aa172e56d5a298a200c3900a598109
# Parent  ea7424f00c5390531be0696a49b958a5d2b6d48b
record: omit meaningless 'qrefresh' suggestion at 'hg qrefresh -i'

Before this patch, 'hg qrefresh -i' under non-interactive mode
suggests 'use qrefresh instead', and it obviously meaningless.

To omit meaningless 'qrefresh' suggestion at 'hg qrefresh -i', this
patch specifies 'None' for 'cmdsuggest' argument of 'cmdutil.dorecord()'.

Patch

diff --git a/hgext/record.py b/hgext/record.py
--- a/hgext/record.py
+++ b/hgext/record.py
@@ -79,7 +79,7 @@ 
         mq.refresh(ui, repo, **opts)
 
     # backup all changed files
-    cmdutil.dorecord(ui, repo, committomq, 'qrefresh', True,
+    cmdutil.dorecord(ui, repo, committomq, None, True,
                     cmdutil.recordfilter, *pats, **opts)
 
 # This command registration is replaced during uisetup().
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
@@ -177,6 +177,9 @@ 
 
 partial qrefresh
 
+  $ hg qrefresh -i --config ui.interactive=false
+  abort: running non-interactively
+  [255]
   $ hg qrefresh -i -d '0 0' <<EOF
   > y
   > y