equal
deleted
inserted
replaced
8 test revset support |
8 test revset support |
9 |
9 |
10 $ cat <<'EOF' >> .hg/hgrc |
10 $ cat <<'EOF' >> .hg/hgrc |
11 > [extdata] |
11 > [extdata] |
12 > filedata = file:extdata.txt |
12 > filedata = file:extdata.txt |
|
13 > notes = notes.txt |
13 > shelldata = shell:cat extdata.txt | grep 2 |
14 > shelldata = shell:cat extdata.txt | grep 2 |
14 > EOF |
15 > EOF |
15 $ cat <<'EOF' > extdata.txt |
16 $ cat <<'EOF' > extdata.txt |
16 > 2 |
17 > 2 another comment on 2 |
17 > 3 |
18 > 3 |
|
19 > EOF |
|
20 $ cat <<'EOF' > notes.txt |
|
21 > f6ed this change is great! |
|
22 > e834 this is buggy :( |
|
23 > 0625 first post |
|
24 > bogusnode gives no error |
18 > EOF |
25 > EOF |
19 |
26 |
20 $ hg log -qr "extdata(filedata)" |
27 $ hg log -qr "extdata(filedata)" |
21 2:f6ed99a58333 |
28 2:f6ed99a58333 |
22 3:9de260b1e88e |
29 3:9de260b1e88e |
41 [255] |
48 [255] |
42 $ hg log -qr "extdata(unknown)" |
49 $ hg log -qr "extdata(unknown)" |
43 abort: unknown extdata source 'unknown' |
50 abort: unknown extdata source 'unknown' |
44 [255] |
51 [255] |
45 |
52 |
|
53 test template support: |
|
54 |
|
55 $ hg log -r:3 -T "{node|short}{if(extdata('notes'), ' # {extdata('notes')}')}\n" |
|
56 06254b906311 # first post |
|
57 e8342c9a2ed1 # this is buggy :( |
|
58 f6ed99a58333 # this change is great! |
|
59 9de260b1e88e |
|
60 |
|
61 test template cache: |
|
62 |
|
63 $ hg log -r:3 -T '{rev} "{extdata("notes")}" "{extdata("shelldata")}"\n' |
|
64 0 "first post" "" |
|
65 1 "this is buggy :(" "" |
|
66 2 "this change is great!" "another comment on 2" |
|
67 3 "" "" |
|
68 |
|
69 test bad extdata() template source |
|
70 |
|
71 $ hg log -T "{extdata()}\n" |
|
72 hg: parse error: extdata expects one argument |
|
73 [255] |
|
74 $ hg log -T "{extdata('unknown')}\n" |
|
75 abort: unknown extdata source 'unknown' |
|
76 [255] |
|
77 |
46 we don't fix up relative file URLs, but we do run shell commands in repo root |
78 we don't fix up relative file URLs, but we do run shell commands in repo root |
47 |
79 |
48 $ mkdir sub |
80 $ mkdir sub |
49 $ cd sub |
81 $ cd sub |
50 $ hg log -qr "extdata(filedata)" |
82 $ hg log -qr "extdata(filedata)" |