diff tests/test-commit-interactive.t @ 25796:4eb8d8a44bf1

record: omit meaningless 'commit' suggestion at 'hg commit -i' Before this patch, 'hg commit -i' under non-interactive mode suggests 'use commit instead', and it obviously meaningless. This patch makes 'record.record'()' examine 'ui.interactive()' and show suggestion by itself before calling 'commands.commit()'. This allows 'commands.commit()' to specify 'None' for 'cmdsuggest' argument of 'cmdutil.dorecord()' to omit meaningless 'commit' suggestion at 'hg commit -i'.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 15 Jul 2015 04:45:58 +0900
parents ff11c1565c04
children 0879bf38ec84
line wrap: on
line diff
--- a/tests/test-commit-interactive.t	Wed Jul 15 03:43:16 2015 +0900
+++ b/tests/test-commit-interactive.t	Wed Jul 15 04:45:58 2015 +0900
@@ -15,6 +15,12 @@
   $ touch empty-rw
   $ hg add empty-rw
 
+  $ hg record --config ui.interactive=false
+  abort: running non-interactively, use commit instead
+  [255]
+  $ hg commit -i --config ui.interactive=false
+  abort: running non-interactively
+  [255]
   $ hg commit -i empty-rw<<EOF
   > n
   > EOF