diff tests/test-extdata.t @ 34542:153e4e05e9b3

extdata: show debug message if external command exits with non-zero status This isn't fatal because it's quite common for grep to exit with 1. Thanks to Foozy for spotting this.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 01 Oct 2017 12:21:50 +0100
parents d5c5cc767b7e
children 54efbbec466d
line wrap: on
line diff
--- a/tests/test-extdata.t	Sat Sep 30 08:57:50 2017 +0100
+++ b/tests/test-extdata.t	Sun Oct 01 12:21:50 2017 +0100
@@ -12,6 +12,7 @@
   > filedata = file:extdata.txt
   > notes = notes.txt
   > shelldata = shell:cat extdata.txt | grep 2
+  > emptygrep = shell:cat extdata.txt | grep empty
   > EOF
   $ cat <<'EOF' > extdata.txt
   > 2 another comment on 2
@@ -42,6 +43,12 @@
     (symbol '3'))
   3
 
+test non-zero exit of shell command
+
+  $ hg log -qr "extdata(emptygrep)"
+  $ hg log -qr "extdata(emptygrep)" --debug
+  extdata command 'cat extdata.txt | grep empty' exited with status * (glob)
+
 test bad extdata() revset source
 
   $ hg log -qr "extdata()"