record: omit meaningless 'qrefresh' suggestion at 'hg qrefresh -i'
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Wed, 15 Jul 2015 04:45:58 +0900
changeset 25798 08f2177b15c7
parent 25797 cc9fb45986d4
child 25799 0eb093e40813
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()'.
hgext/record.py
tests/test-mq-qrefresh-interactive.t
--- a/hgext/record.py	Wed Jul 15 04:45:58 2015 +0900
+++ b/hgext/record.py	Wed Jul 15 04:45:58 2015 +0900
@@ -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().
--- a/tests/test-mq-qrefresh-interactive.t	Wed Jul 15 04:45:58 2015 +0900
+++ b/tests/test-mq-qrefresh-interactive.t	Wed Jul 15 04:45:58 2015 +0900
@@ -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