comparison tests/test-extdata.t @ 35412:b1959391a088

extdata: abort if external command exits with non-zero status (BC) Per the last discussion, this is more reliable and consistent way than suppressing an error. For grep, erroring out might be inconvenient, but for curl, non-zero exit status should be detected. The latter wouldn't be possible if non-zero status is ignored. https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-October/105727.html
author Yuya Nishihara <yuya@tcha.org>
date Sun, 01 Oct 2017 12:21:50 +0100
parents feecfefeba25
children faa41fd282d1
comparison
equal deleted inserted replaced
35411:0fe5d99804bb 35412:b1959391a088
44 3 44 3
45 45
46 test non-zero exit of shell command 46 test non-zero exit of shell command
47 47
48 $ hg log -qr "extdata(emptygrep)" 48 $ hg log -qr "extdata(emptygrep)"
49 $ hg log -qr "extdata(emptygrep)" --debug 49 abort: extdata command 'cat extdata.txt | grep empty' failed: exited with status 1
50 extdata command 'cat extdata.txt | grep empty' exited with status * (glob) 50 [255]
51 51
52 test bad extdata() revset source 52 test bad extdata() revset source
53 53
54 $ hg log -qr "extdata()" 54 $ hg log -qr "extdata()"
55 hg: parse error: extdata takes at least 1 string argument 55 hg: parse error: extdata takes at least 1 string argument