Show More
@@ -1065,6 +1065,10 b' def extdatasource(repo, source):' | |||||
1065 | finally: |
|
1065 | finally: | |
1066 | if proc: |
|
1066 | if proc: | |
1067 | proc.communicate() |
|
1067 | proc.communicate() | |
|
1068 | if proc.returncode != 0: | |||
|
1069 | # not an error so 'cmd | grep' can be empty | |||
|
1070 | repo.ui.debug("extdata command '%s' %s\n" | |||
|
1071 | % (cmd, util.explainexit(proc.returncode)[0])) | |||
1068 | if src: |
|
1072 | if src: | |
1069 | src.close() |
|
1073 | src.close() | |
1070 |
|
1074 |
@@ -12,6 +12,7 b' test revset support' | |||||
12 | > filedata = file:extdata.txt |
|
12 | > filedata = file:extdata.txt | |
13 | > notes = notes.txt |
|
13 | > notes = notes.txt | |
14 | > shelldata = shell:cat extdata.txt | grep 2 |
|
14 | > shelldata = shell:cat extdata.txt | grep 2 | |
|
15 | > emptygrep = shell:cat extdata.txt | grep empty | |||
15 | > EOF |
|
16 | > EOF | |
16 | $ cat <<'EOF' > extdata.txt |
|
17 | $ cat <<'EOF' > extdata.txt | |
17 | > 2 another comment on 2 |
|
18 | > 2 another comment on 2 | |
@@ -42,6 +43,12 b' test weight of extdata() revset' | |||||
42 | (symbol '3')) |
|
43 | (symbol '3')) | |
43 | 3 |
|
44 | 3 | |
44 |
|
45 | |||
|
46 | test non-zero exit of shell command | |||
|
47 | ||||
|
48 | $ hg log -qr "extdata(emptygrep)" | |||
|
49 | $ hg log -qr "extdata(emptygrep)" --debug | |||
|
50 | extdata command 'cat extdata.txt | grep empty' exited with status * (glob) | |||
|
51 | ||||
45 | test bad extdata() revset source |
|
52 | test bad extdata() revset source | |
46 |
|
53 | |||
47 | $ hg log -qr "extdata()" |
|
54 | $ hg log -qr "extdata()" |
General Comments 0
You need to be logged in to leave comments.
Login now