annotate tests/test-command-template.t @ 38434:70f551a3f52e

tests: extract test-template-functions.t from test-command-template.t I decided to not split filters and functions into two test files since we sometimes reimplement a filter as a function.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 16 Jun 2018 13:17:11 +0900
parents ddce7bdf7f3c
children da4508cdef37
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1 $ hg init a
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
2 $ cd a
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
3 $ echo a > a
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
4 $ hg add a
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
5 $ echo line 1 > b
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
6 $ echo line 2 >> b
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
7 $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
8
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
9 $ hg add b
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
10 $ echo other 1 > c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
11 $ echo other 2 >> c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
12 $ echo >> c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
13 $ echo other 3 >> c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
14 $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
15
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
16 $ hg add c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
17 $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
18 $ echo c >> c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
19 $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
20
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
21 $ echo foo > .hg/branch
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
22 $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
23
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
24 $ hg co -q 3
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
25 $ echo other 4 >> d
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
26 $ hg add d
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
27 $ hg commit -m 'new head' -d '1500000 0' -u 'person'
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
28
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
29 $ hg merge -q foo
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
30 $ hg commit -m 'merge' -d '1500001 0' -u 'person'
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
31
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
32 Test arithmetic operators have the right precedence:
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
33
30237
94ef2f00b8a4 tests: use basic format code "%Y" instead of "%s" for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30232
diff changeset
34 $ hg log -l 1 -T '{date(date, "%Y") + 5 * 10} {date(date, "%Y") - 2 * 3}\n'
94ef2f00b8a4 tests: use basic format code "%Y" instead of "%s" for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30232
diff changeset
35 2020 1964
94ef2f00b8a4 tests: use basic format code "%Y" instead of "%s" for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30232
diff changeset
36 $ hg log -l 1 -T '{date(date, "%Y") * 5 + 10} {date(date, "%Y") * 3 - 2}\n'
94ef2f00b8a4 tests: use basic format code "%Y" instead of "%s" for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30232
diff changeset
37 9860 5908
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
38
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
39 Test division:
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
40
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
41 $ hg debugtemplate -r0 -v '{5 / 2} {mod(5, 2)}\n'
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
42 (template
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
43 (/
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
44 (integer '5')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
45 (integer '2'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
46 (string ' ')
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
47 (func
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
48 (symbol 'mod')
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
49 (list
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
50 (integer '5')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
51 (integer '2')))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
52 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
53 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
54 * functions: mod
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
55 2 1
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
56 $ hg debugtemplate -r0 -v '{5 / -2} {mod(5, -2)}\n'
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
57 (template
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
58 (/
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
59 (integer '5')
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
60 (negate
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
61 (integer '2')))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
62 (string ' ')
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
63 (func
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
64 (symbol 'mod')
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
65 (list
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
66 (integer '5')
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
67 (negate
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
68 (integer '2'))))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
69 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
70 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
71 * functions: mod
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
72 -3 -1
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
73 $ hg debugtemplate -r0 -v '{-5 / 2} {mod(-5, 2)}\n'
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
74 (template
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
75 (/
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
76 (negate
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
77 (integer '5'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
78 (integer '2'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
79 (string ' ')
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
80 (func
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
81 (symbol 'mod')
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
82 (list
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
83 (negate
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
84 (integer '5'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
85 (integer '2')))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
86 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
87 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
88 * functions: mod
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
89 -3 1
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
90 $ hg debugtemplate -r0 -v '{-5 / -2} {mod(-5, -2)}\n'
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
91 (template
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
92 (/
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
93 (negate
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
94 (integer '5'))
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
95 (negate
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
96 (integer '2')))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
97 (string ' ')
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
98 (func
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
99 (symbol 'mod')
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
100 (list
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
101 (negate
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
102 (integer '5'))
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
103 (negate
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
104 (integer '2'))))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
105 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
106 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
107 * functions: mod
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
108 2 -1
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
109
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
110 Filters bind closer than arithmetic:
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
111
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
112 $ hg debugtemplate -r0 -v '{revset(".")|count - 1}\n'
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
113 (template
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
114 (-
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
115 (|
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
116 (func
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
117 (symbol 'revset')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
118 (string '.'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
119 (symbol 'count'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
120 (integer '1'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
121 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
122 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
123 * functions: count, revset
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
124 0
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
125
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
126 But negate binds closer still:
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
127
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
128 $ hg debugtemplate -r0 -v '{1-3|stringify}\n'
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
129 (template
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
130 (-
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
131 (integer '1')
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
132 (|
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
133 (integer '3')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
134 (symbol 'stringify')))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
135 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
136 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
137 * functions: stringify
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
138 hg: parse error: arithmetic only defined on integers
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
139 [255]
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
140 $ hg debugtemplate -r0 -v '{-3|stringify}\n'
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
141 (template
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
142 (|
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
143 (negate
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
144 (integer '3'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
145 (symbol 'stringify'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
146 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
147 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
148 * functions: stringify
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
149 -3
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
150
34329
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
151 Filters bind as close as map operator:
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
152
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
153 $ hg debugtemplate -r0 -v '{desc|splitlines % "{line}\n"}'
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
154 (template
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
155 (%
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
156 (|
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
157 (symbol 'desc')
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
158 (symbol 'splitlines'))
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
159 (template
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
160 (symbol 'line')
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
161 (string '\n'))))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
162 * keywords: desc, line
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
163 * functions: splitlines
34329
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
164 line 1
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
165 line 2
6367318327f0 templater: adjust binding strength of '%' and '|' operators (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 34073
diff changeset
166
31885
d18b624c1c06 templater: add parsing rule for key-value pair
Yuya Nishihara <yuya@tcha.org>
parents: 31882
diff changeset
167 Keyword arguments:
d18b624c1c06 templater: add parsing rule for key-value pair
Yuya Nishihara <yuya@tcha.org>
parents: 31882
diff changeset
168
d18b624c1c06 templater: add parsing rule for key-value pair
Yuya Nishihara <yuya@tcha.org>
parents: 31882
diff changeset
169 $ hg debugtemplate -r0 -v '{foo=bar|baz}'
d18b624c1c06 templater: add parsing rule for key-value pair
Yuya Nishihara <yuya@tcha.org>
parents: 31882
diff changeset
170 (template
d18b624c1c06 templater: add parsing rule for key-value pair
Yuya Nishihara <yuya@tcha.org>
parents: 31882
diff changeset
171 (keyvalue
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
172 (symbol 'foo')
31885
d18b624c1c06 templater: add parsing rule for key-value pair
Yuya Nishihara <yuya@tcha.org>
parents: 31882
diff changeset
173 (|
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
174 (symbol 'bar')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
175 (symbol 'baz'))))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
176 * keywords: bar, foo
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
177 * functions: baz
31885
d18b624c1c06 templater: add parsing rule for key-value pair
Yuya Nishihara <yuya@tcha.org>
parents: 31882
diff changeset
178 hg: parse error: can't use a key-value pair in this context
d18b624c1c06 templater: add parsing rule for key-value pair
Yuya Nishihara <yuya@tcha.org>
parents: 31882
diff changeset
179 [255]
d18b624c1c06 templater: add parsing rule for key-value pair
Yuya Nishihara <yuya@tcha.org>
parents: 31882
diff changeset
180
31887
f7b3677f66cd templater: port pad() to take keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents: 31886
diff changeset
181 $ hg debugtemplate '{pad("foo", width=10, left=true)}\n'
f7b3677f66cd templater: port pad() to take keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents: 31886
diff changeset
182 foo
f7b3677f66cd templater: port pad() to take keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents: 31886
diff changeset
183
31886
bdda942f4b9c templater: add support for keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents: 31885
diff changeset
184 Call function which takes named arguments by filter syntax:
bdda942f4b9c templater: add support for keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents: 31885
diff changeset
185
bdda942f4b9c templater: add support for keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents: 31885
diff changeset
186 $ hg debugtemplate '{" "|separate}'
bdda942f4b9c templater: add support for keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents: 31885
diff changeset
187 $ hg debugtemplate '{("not", "an", "argument", "list")|separate}'
bdda942f4b9c templater: add support for keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents: 31885
diff changeset
188 hg: parse error: unknown method 'list'
bdda942f4b9c templater: add support for keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents: 31885
diff changeset
189 [255]
bdda942f4b9c templater: add support for keyword arguments
Yuya Nishihara <yuya@tcha.org>
parents: 31885
diff changeset
190
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
191 Second branch starting at nullrev:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
192
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
193 $ hg update null
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
194 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
195 $ echo second > second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
196 $ hg add second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
197 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
198 created new head
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
199
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
200 $ echo third > third
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
201 $ hg add third
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
202 $ hg mv second fourth
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
203 $ hg commit -m third -d "2020-01-01 10:01"
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
204
18970
3cdb6f2f6789 templatekw: add default styles for hybrid types (issue3887)
Matt Mackall <mpm@selenic.com>
parents: 18893
diff changeset
205 $ hg log --template '{join(file_copies, ",\n")}\n' -r .
3cdb6f2f6789 templatekw: add default styles for hybrid types (issue3887)
Matt Mackall <mpm@selenic.com>
parents: 18893
diff changeset
206 fourth (second)
20665
945bc5497e6d commands: add -T alternative to --template
Matt Mackall <mpm@selenic.com>
parents: 20520
diff changeset
207 $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r .
18715
c4ff927b6f68 templater: properly handle file_copies with %
Matt Mackall <mpm@selenic.com>
parents: 18207
diff changeset
208 second -> fourth
24240
bd504d90588d templater: implement _hybrid.__contains__ so that ifcontains can accept dict
Yuya Nishihara <yuya@tcha.org>
parents: 24157
diff changeset
209 $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7
bd504d90588d templater: implement _hybrid.__contains__ so that ifcontains can accept dict
Yuya Nishihara <yuya@tcha.org>
parents: 24157
diff changeset
210 8 t
bd504d90588d templater: implement _hybrid.__contains__ so that ifcontains can accept dict
Yuya Nishihara <yuya@tcha.org>
parents: 24157
diff changeset
211 7 f
18715
c4ff927b6f68 templater: properly handle file_copies with %
Matt Mackall <mpm@selenic.com>
parents: 18207
diff changeset
212
25740
47469fa8fb01 templatekw: make {rev} return wdirrev instead of None
Yuya Nishihara <yuya@tcha.org>
parents: 25736
diff changeset
213 Working-directory revision has special identifiers, though they are still
47469fa8fb01 templatekw: make {rev} return wdirrev instead of None
Yuya Nishihara <yuya@tcha.org>
parents: 25736
diff changeset
214 experimental:
47469fa8fb01 templatekw: make {rev} return wdirrev instead of None
Yuya Nishihara <yuya@tcha.org>
parents: 25736
diff changeset
215
47469fa8fb01 templatekw: make {rev} return wdirrev instead of None
Yuya Nishihara <yuya@tcha.org>
parents: 25736
diff changeset
216 $ hg log -r 'wdir()' -T '{rev}:{node}\n'
47469fa8fb01 templatekw: make {rev} return wdirrev instead of None
Yuya Nishihara <yuya@tcha.org>
parents: 25736
diff changeset
217 2147483647:ffffffffffffffffffffffffffffffffffffffff
47469fa8fb01 templatekw: make {rev} return wdirrev instead of None
Yuya Nishihara <yuya@tcha.org>
parents: 25736
diff changeset
218
25736
8854ca3fa675 templatekw: apply manifest template only if ctx.manifestnode() exists
Yuya Nishihara <yuya@tcha.org>
parents: 25696
diff changeset
219 Some keywords are invalid for working-directory revision, but they should
8854ca3fa675 templatekw: apply manifest template only if ctx.manifestnode() exists
Yuya Nishihara <yuya@tcha.org>
parents: 25696
diff changeset
220 never cause crash:
8854ca3fa675 templatekw: apply manifest template only if ctx.manifestnode() exists
Yuya Nishihara <yuya@tcha.org>
parents: 25696
diff changeset
221
8854ca3fa675 templatekw: apply manifest template only if ctx.manifestnode() exists
Yuya Nishihara <yuya@tcha.org>
parents: 25696
diff changeset
222 $ hg log -r 'wdir()' -T '{manifest}\n'
8854ca3fa675 templatekw: apply manifest template only if ctx.manifestnode() exists
Yuya Nishihara <yuya@tcha.org>
parents: 25696
diff changeset
223
8854ca3fa675 templatekw: apply manifest template only if ctx.manifestnode() exists
Yuya Nishihara <yuya@tcha.org>
parents: 25696
diff changeset
224
35469
f1c54d003327 templater: move repo, ui and cache to per-engine resources
Yuya Nishihara <yuya@tcha.org>
parents: 34993
diff changeset
225 Internal resources shouldn't be exposed (issue5699):
f1c54d003327 templater: move repo, ui and cache to per-engine resources
Yuya Nishihara <yuya@tcha.org>
parents: 34993
diff changeset
226
35470
a33be093ec62 templater: look up symbols/resources as if they were separated (issue5699)
Yuya Nishihara <yuya@tcha.org>
parents: 35469
diff changeset
227 $ hg log -r. -T '{cache}{ctx}{repo}{revcache}{templ}{ui}'
a33be093ec62 templater: look up symbols/resources as if they were separated (issue5699)
Yuya Nishihara <yuya@tcha.org>
parents: 35469
diff changeset
228
a33be093ec62 templater: look up symbols/resources as if they were separated (issue5699)
Yuya Nishihara <yuya@tcha.org>
parents: 35469
diff changeset
229 Never crash on internal resource not available:
a33be093ec62 templater: look up symbols/resources as if they were separated (issue5699)
Yuya Nishihara <yuya@tcha.org>
parents: 35469
diff changeset
230
a33be093ec62 templater: look up symbols/resources as if they were separated (issue5699)
Yuya Nishihara <yuya@tcha.org>
parents: 35469
diff changeset
231 $ hg --cwd .. debugtemplate '{"c0bebeef"|shortest}\n'
38427
4b73f316ba0e templatefuncs: minimize resource requirements
Yuya Nishihara <yuya@tcha.org>
parents: 38355
diff changeset
232 abort: template resource not available: repo
35470
a33be093ec62 templater: look up symbols/resources as if they were separated (issue5699)
Yuya Nishihara <yuya@tcha.org>
parents: 35469
diff changeset
233 [255]
35469
f1c54d003327 templater: move repo, ui and cache to per-engine resources
Yuya Nishihara <yuya@tcha.org>
parents: 34993
diff changeset
234
36445
e8d37838f5df templatekw: add 'requires' flag to switch to exception-safe interface
Yuya Nishihara <yuya@tcha.org>
parents: 36246
diff changeset
235 $ hg config -T '{author}'
e8d37838f5df templatekw: add 'requires' flag to switch to exception-safe interface
Yuya Nishihara <yuya@tcha.org>
parents: 36246
diff changeset
236
16678
48b1674ac1e7 templater: handle SyntaxError when parsing ui.logtemplate
Martin Geisler <martin@geisler.net>
parents: 15839
diff changeset
237 Quoting for ui.logtemplate
48b1674ac1e7 templater: handle SyntaxError when parsing ui.logtemplate
Martin Geisler <martin@geisler.net>
parents: 15839
diff changeset
238
48b1674ac1e7 templater: handle SyntaxError when parsing ui.logtemplate
Martin Geisler <martin@geisler.net>
parents: 15839
diff changeset
239 $ hg tip --config "ui.logtemplate={rev}\n"
48b1674ac1e7 templater: handle SyntaxError when parsing ui.logtemplate
Martin Geisler <martin@geisler.net>
parents: 15839
diff changeset
240 8
48b1674ac1e7 templater: handle SyntaxError when parsing ui.logtemplate
Martin Geisler <martin@geisler.net>
parents: 15839
diff changeset
241 $ hg tip --config "ui.logtemplate='{rev}\n'"
48b1674ac1e7 templater: handle SyntaxError when parsing ui.logtemplate
Martin Geisler <martin@geisler.net>
parents: 15839
diff changeset
242 8
48b1674ac1e7 templater: handle SyntaxError when parsing ui.logtemplate
Martin Geisler <martin@geisler.net>
parents: 15839
diff changeset
243 $ hg tip --config 'ui.logtemplate="{rev}\n"'
48b1674ac1e7 templater: handle SyntaxError when parsing ui.logtemplate
Martin Geisler <martin@geisler.net>
parents: 15839
diff changeset
244 8
28687
29c249dfb4ef templater: do not strip non-quote characters from template config
Yuya Nishihara <yuya@tcha.org>
parents: 28628
diff changeset
245 $ hg tip --config 'ui.logtemplate=n{rev}\n'
29c249dfb4ef templater: do not strip non-quote characters from template config
Yuya Nishihara <yuya@tcha.org>
parents: 28628
diff changeset
246 n8
16678
48b1674ac1e7 templater: handle SyntaxError when parsing ui.logtemplate
Martin Geisler <martin@geisler.net>
parents: 15839
diff changeset
247
27939
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
248 Check that recursive reference does not fall into RuntimeError (issue4758):
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
249
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
250 common mistake:
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
251
32874
dddba6f3e59c test-command-template: rewrite recursion tests by using a map file
Yuya Nishihara <yuya@tcha.org>
parents: 32684
diff changeset
252 $ cat << EOF > issue4758
dddba6f3e59c test-command-template: rewrite recursion tests by using a map file
Yuya Nishihara <yuya@tcha.org>
parents: 32684
diff changeset
253 > changeset = '{changeset}\n'
dddba6f3e59c test-command-template: rewrite recursion tests by using a map file
Yuya Nishihara <yuya@tcha.org>
parents: 32684
diff changeset
254 > EOF
dddba6f3e59c test-command-template: rewrite recursion tests by using a map file
Yuya Nishihara <yuya@tcha.org>
parents: 32684
diff changeset
255 $ hg log --style ./issue4758
27939
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
256 abort: recursive reference 'changeset' in template
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
257 [255]
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
258
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
259 circular reference:
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
260
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
261 $ cat << EOF > issue4758
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
262 > changeset = '{foo}'
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
263 > foo = '{changeset}'
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
264 > EOF
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
265 $ hg log --style ./issue4758
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
266 abort: recursive reference 'foo' in template
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
267 [255]
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
268
27940
cfe7da66f555 templater: abort if infinite recursion detected while compiling
Yuya Nishihara <yuya@tcha.org>
parents: 27939
diff changeset
269 buildmap() -> gettemplate(), where no thunk was made:
cfe7da66f555 templater: abort if infinite recursion detected while compiling
Yuya Nishihara <yuya@tcha.org>
parents: 27939
diff changeset
270
32874
dddba6f3e59c test-command-template: rewrite recursion tests by using a map file
Yuya Nishihara <yuya@tcha.org>
parents: 32684
diff changeset
271 $ cat << EOF > issue4758
dddba6f3e59c test-command-template: rewrite recursion tests by using a map file
Yuya Nishihara <yuya@tcha.org>
parents: 32684
diff changeset
272 > changeset = '{files % changeset}\n'
dddba6f3e59c test-command-template: rewrite recursion tests by using a map file
Yuya Nishihara <yuya@tcha.org>
parents: 32684
diff changeset
273 > EOF
dddba6f3e59c test-command-template: rewrite recursion tests by using a map file
Yuya Nishihara <yuya@tcha.org>
parents: 32684
diff changeset
274 $ hg log --style ./issue4758
27940
cfe7da66f555 templater: abort if infinite recursion detected while compiling
Yuya Nishihara <yuya@tcha.org>
parents: 27939
diff changeset
275 abort: recursive reference 'changeset' in template
cfe7da66f555 templater: abort if infinite recursion detected while compiling
Yuya Nishihara <yuya@tcha.org>
parents: 27939
diff changeset
276 [255]
cfe7da66f555 templater: abort if infinite recursion detected while compiling
Yuya Nishihara <yuya@tcha.org>
parents: 27939
diff changeset
277
27939
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
278 not a recursion if a keyword of the same name exists:
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
279
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
280 $ cat << EOF > issue4758
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
281 > changeset = '{tags % rev}'
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
282 > rev = '{rev} {tag}\n'
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
283 > EOF
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
284 $ hg log --style ./issue4758 -r tip
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
285 8 tip
7ed3a3c0cef1 templater: abort if infinite recursion detected while evaluation (issue4758)
Yuya Nishihara <yuya@tcha.org>
parents: 27894
diff changeset
286
22764
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
287 Check that {phase} works correctly on parents:
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
288
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
289 $ cat << EOF > parentphase
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
290 > changeset_debug = '{rev} ({phase}):{parents}\n'
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
291 > parent = ' {rev} ({phase})'
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
292 > EOF
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
293 $ hg phase -r 5 --public
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
294 $ hg phase -r 7 --secret --force
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
295 $ hg log --debug -G --style ./parentphase
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
296 @ 8 (secret): 7 (secret) -1 (public)
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
297 |
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
298 o 7 (secret): -1 (public) -1 (public)
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
299
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
300 o 6 (draft): 5 (public) 4 (draft)
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
301 |\
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
302 | o 5 (public): 3 (public) -1 (public)
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
303 | |
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
304 o | 4 (draft): 3 (public) -1 (public)
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
305 |/
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
306 o 3 (public): 2 (public) -1 (public)
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
307 |
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
308 o 2 (public): 1 (public) -1 (public)
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
309 |
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
310 o 1 (public): 0 (public) -1 (public)
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
311 |
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
312 o 0 (public): -1 (public) -1 (public)
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
313
1e2f54a149e8 templater: set the correct phase for parents
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22668
diff changeset
314
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
315 Keys work:
11465
ace5bd98bee3 heads: fix templating of headers again (issue2130)
Simon Howkins <simonh@symbian.org>
parents: 10260
diff changeset
316
13156
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
317 $ for key in author branch branches date desc file_adds file_dels file_mods \
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
318 > file_copies file_copies_switch files \
17357
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
319 > manifest node parents rev tags diffstat extras \
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
320 > p1rev p2rev p1node p2node; do
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
321 > for mode in '' --verbose --debug; do
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
322 > hg log $mode --template "$key$mode: {$key}\n"
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
323 > done
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
324 > done
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
325 author: test
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
326 author: User Name <user@hostname>
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
327 author: person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
328 author: person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
329 author: person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
330 author: person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
331 author: other@place
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
332 author: A. N. Other <other@place>
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
333 author: User Name <user@hostname>
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
334 author--verbose: test
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
335 author--verbose: User Name <user@hostname>
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
336 author--verbose: person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
337 author--verbose: person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
338 author--verbose: person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
339 author--verbose: person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
340 author--verbose: other@place
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
341 author--verbose: A. N. Other <other@place>
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
342 author--verbose: User Name <user@hostname>
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
343 author--debug: test
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
344 author--debug: User Name <user@hostname>
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
345 author--debug: person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
346 author--debug: person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
347 author--debug: person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
348 author--debug: person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
349 author--debug: other@place
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
350 author--debug: A. N. Other <other@place>
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
351 author--debug: User Name <user@hostname>
13156
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
352 branch: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
353 branch: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
354 branch: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
355 branch: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
356 branch: foo
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
357 branch: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
358 branch: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
359 branch: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
360 branch: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
361 branch--verbose: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
362 branch--verbose: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
363 branch--verbose: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
364 branch--verbose: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
365 branch--verbose: foo
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
366 branch--verbose: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
367 branch--verbose: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
368 branch--verbose: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
369 branch--verbose: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
370 branch--debug: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
371 branch--debug: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
372 branch--debug: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
373 branch--debug: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
374 branch--debug: foo
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
375 branch--debug: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
376 branch--debug: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
377 branch--debug: default
d79fdff55627 template: add showbranch template for {branch}
Eric Eisner <ede@mit.edu>
parents: 12399
diff changeset
378 branch--debug: default
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
379 branches:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
380 branches:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
381 branches:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
382 branches:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
383 branches: foo
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
384 branches:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
385 branches:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
386 branches:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
387 branches:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
388 branches--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
389 branches--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
390 branches--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
391 branches--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
392 branches--verbose: foo
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
393 branches--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
394 branches--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
395 branches--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
396 branches--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
397 branches--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
398 branches--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
399 branches--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
400 branches--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
401 branches--debug: foo
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
402 branches--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
403 branches--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
404 branches--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
405 branches--debug:
38299
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
406 date: 1577872860.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
407 date: 1000000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
408 date: 1500001.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
409 date: 1500000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
410 date: 1400000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
411 date: 1300000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
412 date: 1200000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
413 date: 1100000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
414 date: 1000000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
415 date--verbose: 1577872860.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
416 date--verbose: 1000000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
417 date--verbose: 1500001.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
418 date--verbose: 1500000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
419 date--verbose: 1400000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
420 date--verbose: 1300000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
421 date--verbose: 1200000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
422 date--verbose: 1100000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
423 date--verbose: 1000000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
424 date--debug: 1577872860.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
425 date--debug: 1000000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
426 date--debug: 1500001.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
427 date--debug: 1500000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
428 date--debug: 1400000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
429 date--debug: 1300000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
430 date--debug: 1200000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
431 date--debug: 1100000.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
432 date--debug: 1000000.00
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
433 desc: third
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
434 desc: second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
435 desc: merge
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
436 desc: new head
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
437 desc: new branch
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
438 desc: no user, no domain
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
439 desc: no person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
440 desc: other 1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
441 other 2
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
442
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
443 other 3
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
444 desc: line 1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
445 line 2
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
446 desc--verbose: third
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
447 desc--verbose: second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
448 desc--verbose: merge
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
449 desc--verbose: new head
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
450 desc--verbose: new branch
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
451 desc--verbose: no user, no domain
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
452 desc--verbose: no person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
453 desc--verbose: other 1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
454 other 2
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
455
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
456 other 3
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
457 desc--verbose: line 1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
458 line 2
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
459 desc--debug: third
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
460 desc--debug: second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
461 desc--debug: merge
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
462 desc--debug: new head
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
463 desc--debug: new branch
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
464 desc--debug: no user, no domain
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
465 desc--debug: no person
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
466 desc--debug: other 1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
467 other 2
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
468
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
469 other 3
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
470 desc--debug: line 1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
471 line 2
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
472 file_adds: fourth third
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
473 file_adds: second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
474 file_adds:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
475 file_adds: d
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
476 file_adds:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
477 file_adds:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
478 file_adds: c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
479 file_adds: b
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
480 file_adds: a
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
481 file_adds--verbose: fourth third
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
482 file_adds--verbose: second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
483 file_adds--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
484 file_adds--verbose: d
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
485 file_adds--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
486 file_adds--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
487 file_adds--verbose: c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
488 file_adds--verbose: b
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
489 file_adds--verbose: a
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
490 file_adds--debug: fourth third
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
491 file_adds--debug: second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
492 file_adds--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
493 file_adds--debug: d
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
494 file_adds--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
495 file_adds--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
496 file_adds--debug: c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
497 file_adds--debug: b
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
498 file_adds--debug: a
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
499 file_dels: second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
500 file_dels:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
501 file_dels:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
502 file_dels:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
503 file_dels:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
504 file_dels:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
505 file_dels:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
506 file_dels:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
507 file_dels:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
508 file_dels--verbose: second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
509 file_dels--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
510 file_dels--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
511 file_dels--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
512 file_dels--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
513 file_dels--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
514 file_dels--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
515 file_dels--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
516 file_dels--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
517 file_dels--debug: second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
518 file_dels--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
519 file_dels--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
520 file_dels--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
521 file_dels--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
522 file_dels--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
523 file_dels--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
524 file_dels--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
525 file_dels--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
526 file_mods:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
527 file_mods:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
528 file_mods:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
529 file_mods:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
530 file_mods:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
531 file_mods: c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
532 file_mods:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
533 file_mods:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
534 file_mods:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
535 file_mods--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
536 file_mods--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
537 file_mods--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
538 file_mods--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
539 file_mods--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
540 file_mods--verbose: c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
541 file_mods--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
542 file_mods--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
543 file_mods--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
544 file_mods--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
545 file_mods--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
546 file_mods--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
547 file_mods--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
548 file_mods--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
549 file_mods--debug: c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
550 file_mods--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
551 file_mods--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
552 file_mods--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
553 file_copies: fourth (second)
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
554 file_copies:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
555 file_copies:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
556 file_copies:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
557 file_copies:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
558 file_copies:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
559 file_copies:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
560 file_copies:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
561 file_copies:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
562 file_copies--verbose: fourth (second)
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
563 file_copies--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
564 file_copies--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
565 file_copies--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
566 file_copies--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
567 file_copies--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
568 file_copies--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
569 file_copies--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
570 file_copies--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
571 file_copies--debug: fourth (second)
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
572 file_copies--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
573 file_copies--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
574 file_copies--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
575 file_copies--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
576 file_copies--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
577 file_copies--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
578 file_copies--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
579 file_copies--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
580 file_copies_switch:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
581 file_copies_switch:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
582 file_copies_switch:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
583 file_copies_switch:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
584 file_copies_switch:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
585 file_copies_switch:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
586 file_copies_switch:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
587 file_copies_switch:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
588 file_copies_switch:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
589 file_copies_switch--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
590 file_copies_switch--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
591 file_copies_switch--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
592 file_copies_switch--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
593 file_copies_switch--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
594 file_copies_switch--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
595 file_copies_switch--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
596 file_copies_switch--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
597 file_copies_switch--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
598 file_copies_switch--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
599 file_copies_switch--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
600 file_copies_switch--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
601 file_copies_switch--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
602 file_copies_switch--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
603 file_copies_switch--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
604 file_copies_switch--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
605 file_copies_switch--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
606 file_copies_switch--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
607 files: fourth second third
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
608 files: second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
609 files:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
610 files: d
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
611 files:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
612 files: c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
613 files: c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
614 files: b
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
615 files: a
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
616 files--verbose: fourth second third
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
617 files--verbose: second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
618 files--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
619 files--verbose: d
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
620 files--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
621 files--verbose: c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
622 files--verbose: c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
623 files--verbose: b
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
624 files--verbose: a
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
625 files--debug: fourth second third
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
626 files--debug: second
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
627 files--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
628 files--debug: d
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
629 files--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
630 files--debug: c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
631 files--debug: c
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
632 files--debug: b
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
633 files--debug: a
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
634 manifest: 6:94961b75a2da
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
635 manifest: 5:f2dbc354b94e
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
636 manifest: 4:4dc3def4f9b4
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
637 manifest: 4:4dc3def4f9b4
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
638 manifest: 3:cb5a1327723b
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
639 manifest: 3:cb5a1327723b
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
640 manifest: 2:6e0e82995c35
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
641 manifest: 1:4e8d705b1e53
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
642 manifest: 0:a0c8bcbbb45c
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
643 manifest--verbose: 6:94961b75a2da
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
644 manifest--verbose: 5:f2dbc354b94e
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
645 manifest--verbose: 4:4dc3def4f9b4
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
646 manifest--verbose: 4:4dc3def4f9b4
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
647 manifest--verbose: 3:cb5a1327723b
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
648 manifest--verbose: 3:cb5a1327723b
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
649 manifest--verbose: 2:6e0e82995c35
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
650 manifest--verbose: 1:4e8d705b1e53
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
651 manifest--verbose: 0:a0c8bcbbb45c
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
652 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
653 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
654 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
655 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
656 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
657 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
658 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
659 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
660 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
661 node: 95c24699272ef57d062b8bccc32c878bf841784a
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
662 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
663 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
664 node: 13207e5a10d9fd28ec424934298e176197f2c67f
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
665 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
666 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
667 node: 97054abb4ab824450e9164180baf491ae0078465
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
668 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
669 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
670 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
671 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
672 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
673 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
674 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
675 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
676 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
677 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
678 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
679 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
680 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
681 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
682 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
683 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
684 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
685 node--debug: 97054abb4ab824450e9164180baf491ae0078465
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
686 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
687 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
688 parents:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
689 parents: -1:000000000000
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
690 parents: 5:13207e5a10d9 4:bbe44766e73d
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
691 parents: 3:10e46f2dcbf4
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
692 parents:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
693 parents:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
694 parents:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
695 parents:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
696 parents:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
697 parents--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
698 parents--verbose: -1:000000000000
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
699 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
700 parents--verbose: 3:10e46f2dcbf4
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
701 parents--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
702 parents--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
703 parents--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
704 parents--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
705 parents--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
706 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
707 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13666
diff changeset
708 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
709 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
710 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
711 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
712 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
713 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
714 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
715 rev: 8
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
716 rev: 7
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
717 rev: 6
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
718 rev: 5
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
719 rev: 4
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
720 rev: 3
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
721 rev: 2
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
722 rev: 1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
723 rev: 0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
724 rev--verbose: 8
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
725 rev--verbose: 7
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
726 rev--verbose: 6
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
727 rev--verbose: 5
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
728 rev--verbose: 4
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
729 rev--verbose: 3
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
730 rev--verbose: 2
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
731 rev--verbose: 1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
732 rev--verbose: 0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
733 rev--debug: 8
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
734 rev--debug: 7
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
735 rev--debug: 6
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
736 rev--debug: 5
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
737 rev--debug: 4
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
738 rev--debug: 3
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
739 rev--debug: 2
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
740 rev--debug: 1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
741 rev--debug: 0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
742 tags: tip
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
743 tags:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
744 tags:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
745 tags:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
746 tags:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
747 tags:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
748 tags:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
749 tags:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
750 tags:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
751 tags--verbose: tip
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
752 tags--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
753 tags--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
754 tags--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
755 tags--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
756 tags--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
757 tags--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
758 tags--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
759 tags--verbose:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
760 tags--debug: tip
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
761 tags--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
762 tags--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
763 tags--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
764 tags--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
765 tags--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
766 tags--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
767 tags--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
768 tags--debug:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
769 diffstat: 3: +2/-1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
770 diffstat: 1: +1/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
771 diffstat: 0: +0/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
772 diffstat: 1: +1/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
773 diffstat: 0: +0/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
774 diffstat: 1: +1/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
775 diffstat: 1: +4/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
776 diffstat: 1: +2/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
777 diffstat: 1: +1/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
778 diffstat--verbose: 3: +2/-1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
779 diffstat--verbose: 1: +1/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
780 diffstat--verbose: 0: +0/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
781 diffstat--verbose: 1: +1/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
782 diffstat--verbose: 0: +0/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
783 diffstat--verbose: 1: +1/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
784 diffstat--verbose: 1: +4/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
785 diffstat--verbose: 1: +2/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
786 diffstat--verbose: 1: +1/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
787 diffstat--debug: 3: +2/-1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
788 diffstat--debug: 1: +1/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
789 diffstat--debug: 0: +0/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
790 diffstat--debug: 1: +1/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
791 diffstat--debug: 0: +0/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
792 diffstat--debug: 1: +1/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
793 diffstat--debug: 1: +4/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
794 diffstat--debug: 1: +2/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
795 diffstat--debug: 1: +1/-0
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
796 extras: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
797 extras: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
798 extras: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
799 extras: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
800 extras: branch=foo
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
801 extras: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
802 extras: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
803 extras: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
804 extras: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
805 extras--verbose: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
806 extras--verbose: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
807 extras--verbose: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
808 extras--verbose: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
809 extras--verbose: branch=foo
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
810 extras--verbose: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
811 extras--verbose: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
812 extras--verbose: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
813 extras--verbose: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
814 extras--debug: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
815 extras--debug: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
816 extras--debug: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
817 extras--debug: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
818 extras--debug: branch=foo
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
819 extras--debug: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
820 extras--debug: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
821 extras--debug: branch=default
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
822 extras--debug: branch=default
17357
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
823 p1rev: 7
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
824 p1rev: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
825 p1rev: 5
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
826 p1rev: 3
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
827 p1rev: 3
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
828 p1rev: 2
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
829 p1rev: 1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
830 p1rev: 0
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
831 p1rev: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
832 p1rev--verbose: 7
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
833 p1rev--verbose: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
834 p1rev--verbose: 5
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
835 p1rev--verbose: 3
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
836 p1rev--verbose: 3
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
837 p1rev--verbose: 2
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
838 p1rev--verbose: 1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
839 p1rev--verbose: 0
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
840 p1rev--verbose: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
841 p1rev--debug: 7
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
842 p1rev--debug: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
843 p1rev--debug: 5
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
844 p1rev--debug: 3
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
845 p1rev--debug: 3
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
846 p1rev--debug: 2
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
847 p1rev--debug: 1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
848 p1rev--debug: 0
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
849 p1rev--debug: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
850 p2rev: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
851 p2rev: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
852 p2rev: 4
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
853 p2rev: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
854 p2rev: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
855 p2rev: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
856 p2rev: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
857 p2rev: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
858 p2rev: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
859 p2rev--verbose: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
860 p2rev--verbose: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
861 p2rev--verbose: 4
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
862 p2rev--verbose: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
863 p2rev--verbose: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
864 p2rev--verbose: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
865 p2rev--verbose: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
866 p2rev--verbose: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
867 p2rev--verbose: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
868 p2rev--debug: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
869 p2rev--debug: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
870 p2rev--debug: 4
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
871 p2rev--debug: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
872 p2rev--debug: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
873 p2rev--debug: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
874 p2rev--debug: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
875 p2rev--debug: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
876 p2rev--debug: -1
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
877 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
878 p1node: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
879 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
880 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
881 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
882 p1node: 97054abb4ab824450e9164180baf491ae0078465
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
883 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
884 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
885 p1node: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
886 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
887 p1node--verbose: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
888 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
889 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
890 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
891 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
892 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
893 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
894 p1node--verbose: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
895 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
896 p1node--debug: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
897 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
898 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
899 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
900 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
901 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
902 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
903 p1node--debug: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
904 p2node: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
905 p2node: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
906 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
907 p2node: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
908 p2node: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
909 p2node: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
910 p2node: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
911 p2node: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
912 p2node: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
913 p2node--verbose: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
914 p2node--verbose: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
915 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
916 p2node--verbose: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
917 p2node--verbose: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
918 p2node--verbose: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
919 p2node--verbose: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
920 p2node--verbose: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
921 p2node--verbose: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
922 p2node--debug: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
923 p2node--debug: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
924 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
925 p2node--debug: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
926 p2node--debug: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
927 p2node--debug: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
928 p2node--debug: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
929 p2node--debug: 0000000000000000000000000000000000000000
bd605568c5a0 templatekw: add p1rev, p1node, p2rev, p2node keywords
epriestley <hg@yghe.net>
parents: 17345
diff changeset
930 p2node--debug: 0000000000000000000000000000000000000000
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
931
25005
5ddbb024c2e9 tests: fix hidden repeatability problem with age filter test
Matt Mackall <mpm@selenic.com>
parents: 25003
diff changeset
932 Add a dummy commit to make up for the instability of the above:
5ddbb024c2e9 tests: fix hidden repeatability problem with age filter test
Matt Mackall <mpm@selenic.com>
parents: 25003
diff changeset
933
5ddbb024c2e9 tests: fix hidden repeatability problem with age filter test
Matt Mackall <mpm@selenic.com>
parents: 25003
diff changeset
934 $ echo a > a
5ddbb024c2e9 tests: fix hidden repeatability problem with age filter test
Matt Mackall <mpm@selenic.com>
parents: 25003
diff changeset
935 $ hg add a
5ddbb024c2e9 tests: fix hidden repeatability problem with age filter test
Matt Mackall <mpm@selenic.com>
parents: 25003
diff changeset
936 $ hg ci -m future
5ddbb024c2e9 tests: fix hidden repeatability problem with age filter test
Matt Mackall <mpm@selenic.com>
parents: 25003
diff changeset
937
24985
20bff5d09018 tests: add a new commit to test-commandline-template
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24966
diff changeset
938 Add a commit that does all possible modifications at once
20bff5d09018 tests: add a new commit to test-commandline-template
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24966
diff changeset
939
20bff5d09018 tests: add a new commit to test-commandline-template
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24966
diff changeset
940 $ echo modify >> third
20bff5d09018 tests: add a new commit to test-commandline-template
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24966
diff changeset
941 $ touch b
20bff5d09018 tests: add a new commit to test-commandline-template
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24966
diff changeset
942 $ hg add b
20bff5d09018 tests: add a new commit to test-commandline-template
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24966
diff changeset
943 $ hg mv fourth fifth
20bff5d09018 tests: add a new commit to test-commandline-template
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24966
diff changeset
944 $ hg rm a
20bff5d09018 tests: add a new commit to test-commandline-template
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24966
diff changeset
945 $ hg ci -m "Modify, add, remove, rename"
20bff5d09018 tests: add a new commit to test-commandline-template
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 24966
diff changeset
946
38433
ddce7bdf7f3c tests: extract test-template-map.t from test-command-template.t
Yuya Nishihara <yuya@tcha.org>
parents: 38427
diff changeset
947 Error on syntax:
ddce7bdf7f3c tests: extract test-template-map.t from test-command-template.t
Yuya Nishihara <yuya@tcha.org>
parents: 38427
diff changeset
948
ddce7bdf7f3c tests: extract test-template-map.t from test-command-template.t
Yuya Nishihara <yuya@tcha.org>
parents: 38427
diff changeset
949 $ cat <<EOF > t
ddce7bdf7f3c tests: extract test-template-map.t from test-command-template.t
Yuya Nishihara <yuya@tcha.org>
parents: 38427
diff changeset
950 > changeset = '{c}'
ddce7bdf7f3c tests: extract test-template-map.t from test-command-template.t
Yuya Nishihara <yuya@tcha.org>
parents: 38427
diff changeset
951 > c = q
ddce7bdf7f3c tests: extract test-template-map.t from test-command-template.t
Yuya Nishihara <yuya@tcha.org>
parents: 38427
diff changeset
952 > x = "f
25006
517763f87141 log: add a status template
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 25005
diff changeset
953 > EOF
38433
ddce7bdf7f3c tests: extract test-template-map.t from test-command-template.t
Yuya Nishihara <yuya@tcha.org>
parents: 38427
diff changeset
954 $ echo '[ui]' > .hg/hgrc
ddce7bdf7f3c tests: extract test-template-map.t from test-command-template.t
Yuya Nishihara <yuya@tcha.org>
parents: 38427
diff changeset
955 $ echo 'style = t' >> .hg/hgrc
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
956 $ hg log
28628
ed1d90f6e921 templater: do not abuse SyntaxError to report errors in template map file
Yuya Nishihara <yuya@tcha.org>
parents: 28548
diff changeset
957 hg: parse error at t:3: unmatched quotes
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12283
diff changeset
958 [255]
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
959
25782
babd2c93bd99 templater: check existence of closing brace of template string
Yuya Nishihara <yuya@tcha.org>
parents: 25762
diff changeset
960 $ hg log -T '{date'
babd2c93bd99 templater: check existence of closing brace of template string
Yuya Nishihara <yuya@tcha.org>
parents: 25762
diff changeset
961 hg: parse error at 1: unterminated template expansion
36669
80d7fb6c2dec templater: add hint to template parse errors to help locate issues
Ryan McElroy <rmcelroy@fb.com>
parents: 36635
diff changeset
962 ({date
36691
1b179d151578 templater: fix position of terminator character in error message
Yuya Nishihara <yuya@tcha.org>
parents: 36669
diff changeset
963 ^ here)
25782
babd2c93bd99 templater: check existence of closing brace of template string
Yuya Nishihara <yuya@tcha.org>
parents: 25762
diff changeset
964 [255]
35680
077ee15b8493 templater: make sure expression is terminated by '}'
Yuya Nishihara <yuya@tcha.org>
parents: 35594
diff changeset
965 $ hg log -T '{date(}'
36691
1b179d151578 templater: fix position of terminator character in error message
Yuya Nishihara <yuya@tcha.org>
parents: 36669
diff changeset
966 hg: parse error at 6: not a prefix: end
36669
80d7fb6c2dec templater: add hint to template parse errors to help locate issues
Ryan McElroy <rmcelroy@fb.com>
parents: 36635
diff changeset
967 ({date(}
80d7fb6c2dec templater: add hint to template parse errors to help locate issues
Ryan McElroy <rmcelroy@fb.com>
parents: 36635
diff changeset
968 ^ here)
35680
077ee15b8493 templater: make sure expression is terminated by '}'
Yuya Nishihara <yuya@tcha.org>
parents: 35594
diff changeset
969 [255]
077ee15b8493 templater: make sure expression is terminated by '}'
Yuya Nishihara <yuya@tcha.org>
parents: 35594
diff changeset
970 $ hg log -T '{date)}'
077ee15b8493 templater: make sure expression is terminated by '}'
Yuya Nishihara <yuya@tcha.org>
parents: 35594
diff changeset
971 hg: parse error at 5: invalid token
36669
80d7fb6c2dec templater: add hint to template parse errors to help locate issues
Ryan McElroy <rmcelroy@fb.com>
parents: 36635
diff changeset
972 ({date)}
36691
1b179d151578 templater: fix position of terminator character in error message
Yuya Nishihara <yuya@tcha.org>
parents: 36669
diff changeset
973 ^ here)
35680
077ee15b8493 templater: make sure expression is terminated by '}'
Yuya Nishihara <yuya@tcha.org>
parents: 35594
diff changeset
974 [255]
077ee15b8493 templater: make sure expression is terminated by '}'
Yuya Nishihara <yuya@tcha.org>
parents: 35594
diff changeset
975 $ hg log -T '{date date}'
077ee15b8493 templater: make sure expression is terminated by '}'
Yuya Nishihara <yuya@tcha.org>
parents: 35594
diff changeset
976 hg: parse error at 6: invalid token
36669
80d7fb6c2dec templater: add hint to template parse errors to help locate issues
Ryan McElroy <rmcelroy@fb.com>
parents: 36635
diff changeset
977 ({date date}
36691
1b179d151578 templater: fix position of terminator character in error message
Yuya Nishihara <yuya@tcha.org>
parents: 36669
diff changeset
978 ^ here)
35680
077ee15b8493 templater: make sure expression is terminated by '}'
Yuya Nishihara <yuya@tcha.org>
parents: 35594
diff changeset
979 [255]
25782
babd2c93bd99 templater: check existence of closing brace of template string
Yuya Nishihara <yuya@tcha.org>
parents: 25762
diff changeset
980
35744
8685192a8733 templater: fix crash by empty group expression
Yuya Nishihara <yuya@tcha.org>
parents: 35680
diff changeset
981 $ hg log -T '{}'
36691
1b179d151578 templater: fix position of terminator character in error message
Yuya Nishihara <yuya@tcha.org>
parents: 36669
diff changeset
982 hg: parse error at 1: not a prefix: end
36669
80d7fb6c2dec templater: add hint to template parse errors to help locate issues
Ryan McElroy <rmcelroy@fb.com>
parents: 36635
diff changeset
983 ({}
80d7fb6c2dec templater: add hint to template parse errors to help locate issues
Ryan McElroy <rmcelroy@fb.com>
parents: 36635
diff changeset
984 ^ here)
35744
8685192a8733 templater: fix crash by empty group expression
Yuya Nishihara <yuya@tcha.org>
parents: 35680
diff changeset
985 [255]
8685192a8733 templater: fix crash by empty group expression
Yuya Nishihara <yuya@tcha.org>
parents: 35680
diff changeset
986 $ hg debugtemplate -v '{()}'
8685192a8733 templater: fix crash by empty group expression
Yuya Nishihara <yuya@tcha.org>
parents: 35680
diff changeset
987 (template
8685192a8733 templater: fix crash by empty group expression
Yuya Nishihara <yuya@tcha.org>
parents: 35680
diff changeset
988 (group
8685192a8733 templater: fix crash by empty group expression
Yuya Nishihara <yuya@tcha.org>
parents: 35680
diff changeset
989 None))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
990 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
991 * functions:
35744
8685192a8733 templater: fix crash by empty group expression
Yuya Nishihara <yuya@tcha.org>
parents: 35680
diff changeset
992 hg: parse error: missing argument
8685192a8733 templater: fix crash by empty group expression
Yuya Nishihara <yuya@tcha.org>
parents: 35680
diff changeset
993 [255]
25782
babd2c93bd99 templater: check existence of closing brace of template string
Yuya Nishihara <yuya@tcha.org>
parents: 25762
diff changeset
994
37223
08e042f0a67c templatefilters: declare input type as bytes where appropriate
Yuya Nishihara <yuya@tcha.org>
parents: 37105
diff changeset
995 Behind the scenes, this would throw TypeError without intype=bytes
17383
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
996
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
997 $ hg log -l 3 --template '{date|obfuscate}\n'
38299
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
998 &#48;&#46;&#48;&#48;
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
999 &#48;&#46;&#48;&#48;
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
1000 &#49;&#53;&#55;&#55;&#56;&#55;&#50;&#56;&#54;&#48;&#46;&#48;&#48;
17383
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1001
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1002 Behind the scenes, this will throw a ValueError
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1003
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1004 $ hg log -l 3 --template 'line: {desc|shortdate}\n'
37227
9bcf096a2da2 templatefilters: declare input type as date where appropriate
Yuya Nishihara <yuya@tcha.org>
parents: 37223
diff changeset
1005 hg: parse error: invalid date: 'Modify, add, remove, rename'
9bcf096a2da2 templatefilters: declare input type as date where appropriate
Yuya Nishihara <yuya@tcha.org>
parents: 37223
diff changeset
1006 (template filter 'shortdate' is not compatible with keyword 'desc')
17383
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1007 [255]
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1008
37223
08e042f0a67c templatefilters: declare input type as bytes where appropriate
Yuya Nishihara <yuya@tcha.org>
parents: 37105
diff changeset
1009 Behind the scenes, this would throw AttributeError without intype=bytes
17383
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1010
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1011 $ hg log -l 3 --template 'line: {date|escape}\n'
38299
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
1012 line: 0.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
1013 line: 0.00
88e7105b5cd9 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org>
parents: 38289
diff changeset
1014 line: 1577872860.00
17383
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1015
26127
7012be5ab5bd templater: port localdate filter to a function
Yuya Nishihara <yuya@tcha.org>
parents: 26106
diff changeset
1016 $ hg log -l 3 --template 'line: {extras|localdate}\n'
7012be5ab5bd templater: port localdate filter to a function
Yuya Nishihara <yuya@tcha.org>
parents: 26106
diff changeset
1017 hg: parse error: localdate expects a date information
7012be5ab5bd templater: port localdate filter to a function
Yuya Nishihara <yuya@tcha.org>
parents: 26106
diff changeset
1018 [255]
7012be5ab5bd templater: port localdate filter to a function
Yuya Nishihara <yuya@tcha.org>
parents: 26106
diff changeset
1019
17383
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1020 Behind the scenes, this will throw ValueError
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1021
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1022 $ hg tip --template '{author|email|date}\n'
26106
c568c4db036f templatefilters: remove redundant 'date' and 'strip' filters
Yuya Nishihara <yuya@tcha.org>
parents: 26105
diff changeset
1023 hg: parse error: date expects a date information
17383
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1024 [255]
099c778ceb33 templater: abort when a template filter raises an exception (issue2987)
Neil Kodner <neilk@fb.com>
parents: 17345
diff changeset
1025
31927
2abc556dbe92 templater: find keyword name more thoroughly on filtering error
Yuya Nishihara <yuya@tcha.org>
parents: 31926
diff changeset
1026 $ hg tip -T '{author|email|shortdate}\n'
37227
9bcf096a2da2 templatefilters: declare input type as date where appropriate
Yuya Nishihara <yuya@tcha.org>
parents: 37223
diff changeset
1027 hg: parse error: invalid date: 'test'
9bcf096a2da2 templatefilters: declare input type as date where appropriate
Yuya Nishihara <yuya@tcha.org>
parents: 37223
diff changeset
1028 (template filter 'shortdate' is not compatible with keyword 'author')
31927
2abc556dbe92 templater: find keyword name more thoroughly on filtering error
Yuya Nishihara <yuya@tcha.org>
parents: 31926
diff changeset
1029 [255]
2abc556dbe92 templater: find keyword name more thoroughly on filtering error
Yuya Nishihara <yuya@tcha.org>
parents: 31926
diff changeset
1030
2abc556dbe92 templater: find keyword name more thoroughly on filtering error
Yuya Nishihara <yuya@tcha.org>
parents: 31926
diff changeset
1031 $ hg tip -T '{get(extras, "branch")|shortdate}\n'
37227
9bcf096a2da2 templatefilters: declare input type as date where appropriate
Yuya Nishihara <yuya@tcha.org>
parents: 37223
diff changeset
1032 hg: parse error: invalid date: 'default'
9bcf096a2da2 templatefilters: declare input type as date where appropriate
Yuya Nishihara <yuya@tcha.org>
parents: 37223
diff changeset
1033 (incompatible use of template filter 'shortdate')
31927
2abc556dbe92 templater: find keyword name more thoroughly on filtering error
Yuya Nishihara <yuya@tcha.org>
parents: 31926
diff changeset
1034 [255]
2abc556dbe92 templater: find keyword name more thoroughly on filtering error
Yuya Nishihara <yuya@tcha.org>
parents: 31926
diff changeset
1035
25783
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1036 Error in nested template:
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1037
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1038 $ hg log -T '{"date'
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1039 hg: parse error at 2: unterminated string
36669
80d7fb6c2dec templater: add hint to template parse errors to help locate issues
Ryan McElroy <rmcelroy@fb.com>
parents: 36635
diff changeset
1040 ({"date
36691
1b179d151578 templater: fix position of terminator character in error message
Yuya Nishihara <yuya@tcha.org>
parents: 36669
diff changeset
1041 ^ here)
25783
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1042 [255]
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1043
31885
d18b624c1c06 templater: add parsing rule for key-value pair
Yuya Nishihara <yuya@tcha.org>
parents: 31882
diff changeset
1044 $ hg log -T '{"foo{date|?}"}'
25783
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1045 hg: parse error at 11: syntax error
36669
80d7fb6c2dec templater: add hint to template parse errors to help locate issues
Ryan McElroy <rmcelroy@fb.com>
parents: 36635
diff changeset
1046 ({"foo{date|?}"}
36691
1b179d151578 templater: fix position of terminator character in error message
Yuya Nishihara <yuya@tcha.org>
parents: 36669
diff changeset
1047 ^ here)
25783
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1048 [255]
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1049
20857
6eb55310fcbc templater: raise error for unknown func
Sean Farley <sean.michael.farley@gmail.com>
parents: 20663
diff changeset
1050 Thrown an error if a template function doesn't exist
6eb55310fcbc templater: raise error for unknown func
Sean Farley <sean.michael.farley@gmail.com>
parents: 20663
diff changeset
1051
6eb55310fcbc templater: raise error for unknown func
Sean Farley <sean.michael.farley@gmail.com>
parents: 20663
diff changeset
1052 $ hg tip --template '{foo()}\n'
6eb55310fcbc templater: raise error for unknown func
Sean Farley <sean.michael.farley@gmail.com>
parents: 20663
diff changeset
1053 hg: parse error: unknown function 'foo'
6eb55310fcbc templater: raise error for unknown func
Sean Farley <sean.michael.farley@gmail.com>
parents: 20663
diff changeset
1054 [255]
6eb55310fcbc templater: raise error for unknown func
Sean Farley <sean.michael.farley@gmail.com>
parents: 20663
diff changeset
1055
31807
e6eb86b154c5 templater: provide loop counter as "index" keyword
Yuya Nishihara <yuya@tcha.org>
parents: 31765
diff changeset
1056 Test index keyword:
e6eb86b154c5 templater: provide loop counter as "index" keyword
Yuya Nishihara <yuya@tcha.org>
parents: 31765
diff changeset
1057
e6eb86b154c5 templater: provide loop counter as "index" keyword
Yuya Nishihara <yuya@tcha.org>
parents: 31765
diff changeset
1058 $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n'
e6eb86b154c5 templater: provide loop counter as "index" keyword
Yuya Nishihara <yuya@tcha.org>
parents: 31765
diff changeset
1059 10 0:a 1:b 2:fifth 3:fourth 4:third
e6eb86b154c5 templater: provide loop counter as "index" keyword
Yuya Nishihara <yuya@tcha.org>
parents: 31765
diff changeset
1060 11 0:a
e6eb86b154c5 templater: provide loop counter as "index" keyword
Yuya Nishihara <yuya@tcha.org>
parents: 31765
diff changeset
1061
e6eb86b154c5 templater: provide loop counter as "index" keyword
Yuya Nishihara <yuya@tcha.org>
parents: 31765
diff changeset
1062 $ hg branches -T '{index} {branch}\n'
e6eb86b154c5 templater: provide loop counter as "index" keyword
Yuya Nishihara <yuya@tcha.org>
parents: 31765
diff changeset
1063 0 default
e6eb86b154c5 templater: provide loop counter as "index" keyword
Yuya Nishihara <yuya@tcha.org>
parents: 31765
diff changeset
1064 1 foo
e6eb86b154c5 templater: provide loop counter as "index" keyword
Yuya Nishihara <yuya@tcha.org>
parents: 31765
diff changeset
1065
34993
625d5ebce066 templatekw: add verbosity keyword to select template by -q/-v/--debug flag
Yuya Nishihara <yuya@tcha.org>
parents: 34866
diff changeset
1066 ui verbosity:
625d5ebce066 templatekw: add verbosity keyword to select template by -q/-v/--debug flag
Yuya Nishihara <yuya@tcha.org>
parents: 34866
diff changeset
1067
625d5ebce066 templatekw: add verbosity keyword to select template by -q/-v/--debug flag
Yuya Nishihara <yuya@tcha.org>
parents: 34866
diff changeset
1068 $ hg log -l1 -T '{verbosity}\n'
625d5ebce066 templatekw: add verbosity keyword to select template by -q/-v/--debug flag
Yuya Nishihara <yuya@tcha.org>
parents: 34866
diff changeset
1069
625d5ebce066 templatekw: add verbosity keyword to select template by -q/-v/--debug flag
Yuya Nishihara <yuya@tcha.org>
parents: 34866
diff changeset
1070 $ hg log -l1 -T '{verbosity}\n' --debug
625d5ebce066 templatekw: add verbosity keyword to select template by -q/-v/--debug flag
Yuya Nishihara <yuya@tcha.org>
parents: 34866
diff changeset
1071 debug
625d5ebce066 templatekw: add verbosity keyword to select template by -q/-v/--debug flag
Yuya Nishihara <yuya@tcha.org>
parents: 34866
diff changeset
1072 $ hg log -l1 -T '{verbosity}\n' --quiet
625d5ebce066 templatekw: add verbosity keyword to select template by -q/-v/--debug flag
Yuya Nishihara <yuya@tcha.org>
parents: 34866
diff changeset
1073 quiet
625d5ebce066 templatekw: add verbosity keyword to select template by -q/-v/--debug flag
Yuya Nishihara <yuya@tcha.org>
parents: 34866
diff changeset
1074 $ hg log -l1 -T '{verbosity}\n' --verbose
625d5ebce066 templatekw: add verbosity keyword to select template by -q/-v/--debug flag
Yuya Nishihara <yuya@tcha.org>
parents: 34866
diff changeset
1075 verbose
625d5ebce066 templatekw: add verbosity keyword to select template by -q/-v/--debug flag
Yuya Nishihara <yuya@tcha.org>
parents: 34866
diff changeset
1076
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1077 $ cd ..
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1078
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1079
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1080 latesttag:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1081
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1082 $ hg init latesttag
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1083 $ cd latesttag
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1084
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1085 $ echo a > file
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1086 $ hg ci -Am a -d '0 0'
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1087 adding file
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1088
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1089 $ echo b >> file
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1090 $ hg ci -m b -d '1 0'
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1091
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1092 $ echo c >> head1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1093 $ hg ci -Am h1c -d '2 0'
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1094 adding head1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1095
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1096 $ hg update -q 1
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1097 $ echo d >> head2
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1098 $ hg ci -Am h2d -d '3 0'
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1099 adding head2
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1100 created new head
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1101
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1102 $ echo e >> head2
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1103 $ hg ci -m h2e -d '4 0'
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1104
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1105 $ hg merge -q
19989
c38c3fdc8b93 date: allow %z in format (issue4040)
Matt Mackall <mpm@selenic.com>
parents: 19770
diff changeset
1106 $ hg ci -m merge -d '5 -3600'
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1107
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1108 No tag set:
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1109
33861
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1110 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1111 @ 5: null+5
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1112 |\
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1113 | o 4: null+4
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1114 | |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1115 | o 3: null+3
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1116 | |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1117 o | 2: null+3
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1118 |/
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1119 o 1: null+2
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1120 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1121 o 0: null+1
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1122
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1123
33862
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1124 One common tag: longest path wins for {latesttagdistance}:
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1125
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1126 $ hg tag -r 1 -m t1 -d '6 0' t1
33861
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1127 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1128 @ 6: t1+4
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1129 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1130 o 5: t1+3
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1131 |\
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1132 | o 4: t1+2
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1133 | |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1134 | o 3: t1+1
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1135 | |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1136 o | 2: t1+1
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1137 |/
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1138 o 1: t1+0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1139 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1140 o 0: null+1
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1141
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1142
33862
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1143 One ancestor tag: closest wins:
10249
8ebb34b0f6f7 cmdutil: expand style paths (issue1948)
Patrick Mezard <pmezard@gmail.com>
parents: 9536
diff changeset
1144
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1145 $ hg tag -r 2 -m t2 -d '7 0' t2
33861
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1146 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1147 @ 7: t2+3
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1148 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1149 o 6: t2+2
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1150 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1151 o 5: t2+1
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1152 |\
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1153 | o 4: t1+2
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1154 | |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1155 | o 3: t1+1
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1156 | |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1157 o | 2: t2+0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1158 |/
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1159 o 1: t1+0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1160 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1161 o 0: null+1
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1162
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1163
33862
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1164 Two branch tags: more recent wins if same number of changes:
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1165
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1166 $ hg tag -r 3 -m t3 -d '8 0' t3
33861
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1167 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1168 @ 8: t3+5
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1169 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1170 o 7: t3+4
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1171 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1172 o 6: t3+3
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1173 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1174 o 5: t3+2
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1175 |\
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1176 | o 4: t3+1
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1177 | |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1178 | o 3: t3+0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1179 | |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1180 o | 2: t2+0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1181 |/
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1182 o 1: t1+0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1183 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1184 o 0: null+1
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1185
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1186
33862
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1187 Two branch tags: fewest changes wins:
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1188
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1189 $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1190 $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1191 @ 9: t4+5,6
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1192 |
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1193 o 8: t4+4,5
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1194 |
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1195 o 7: t4+3,4
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1196 |
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1197 o 6: t4+2,3
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1198 |
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1199 o 5: t4+1,2
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1200 |\
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1201 | o 4: t4+0,0
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1202 | |
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1203 | o 3: t3+0,0
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1204 | |
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1205 o | 2: t2+0,0
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1206 |/
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1207 o 1: t1+0,0
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1208 |
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1209 o 0: null+1,1
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1210
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1211
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1212 Merged tag overrides:
9536
f04d17912441 cmdutil: templating keywords latesttag and latesttagdistance
Mads Kiilerich <mads@kiilerich.com>
parents: 9382
diff changeset
1213
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1214 $ hg tag -r 5 -m t5 -d '9 0' t5
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1215 $ hg tag -r 3 -m at3 -d '10 0' at3
33861
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1216 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
33862
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1217 @ 11: t5+6
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1218 |
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1219 o 10: t5+5
33861
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1220 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1221 o 9: t5+4
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1222 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1223 o 8: t5+3
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1224 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1225 o 7: t5+2
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1226 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1227 o 6: t5+1
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1228 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1229 o 5: t5+0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1230 |\
33862
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1231 | o 4: t4+0
33861
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1232 | |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1233 | o 3: at3:t3+0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1234 | |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1235 o | 2: t2+0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1236 |/
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1237 o 1: t1+0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1238 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1239 o 0: null+1
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1240
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1241
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1242 $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
33862
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1243 @ 11: t5+6,6
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1244 |
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1245 o 10: t5+5,5
33861
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1246 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1247 o 9: t5+4,4
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1248 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1249 o 8: t5+3,3
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1250 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1251 o 7: t5+2,2
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1252 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1253 o 6: t5+1,1
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1254 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1255 o 5: t5+0,0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1256 |\
33862
fb672eac2702 templatekw: choose {latesttag} by len(changes), not date (issue5659)
Martin von Zweigbergk <martinvonz@google.com>
parents: 33861
diff changeset
1257 | o 4: t4+0,0
33861
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1258 | |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1259 | o 3: at3+0,0 t3+0,0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1260 | |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1261 o | 2: t2+0,0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1262 |/
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1263 o 1: t1+0,0
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1264 |
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1265 o 0: null+1,1
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1266
0e15d5ae52cf tests: use graph log in {latesttag} tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 33542
diff changeset
1267
12283
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1268 $ cd ..
850e089eb41c tests: unify test-command-template
Adrian Buehlmann <adrian@cadifra.com>
parents: 11656
diff changeset
1269
17631
0b241d7a8c62 templating: make new-style templating features work with command line lists
Matt Mackall <mpm@selenic.com>
parents: 17387
diff changeset
1270 Test new-style inline templating:
0b241d7a8c62 templating: make new-style templating features work with command line lists
Matt Mackall <mpm@selenic.com>
parents: 17387
diff changeset
1271
0b241d7a8c62 templating: make new-style templating features work with command line lists
Matt Mackall <mpm@selenic.com>
parents: 17387
diff changeset
1272 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
0b241d7a8c62 templating: make new-style templating features work with command line lists
Matt Mackall <mpm@selenic.com>
parents: 17387
diff changeset
1273 modified files: .hgtags
0b241d7a8c62 templating: make new-style templating features work with command line lists
Matt Mackall <mpm@selenic.com>
parents: 17387
diff changeset
1274
28349
7cb2f2438f85 templater: handle exception when applying map operator to non-iterable object
Yuya Nishihara <yuya@tcha.org>
parents: 28346
diff changeset
1275
7cb2f2438f85 templater: handle exception when applying map operator to non-iterable object
Yuya Nishihara <yuya@tcha.org>
parents: 28346
diff changeset
1276 $ hg log -R latesttag -r tip -T '{rev % "a"}\n'
38229
7701c2d4a438 templater: always map over a wrapped object
Yuya Nishihara <yuya@tcha.org>
parents: 38228
diff changeset
1277 hg: parse error: 11 is not iterable of mappings
38271
4b0f39e7406e templater: show slightly better hint on map operation error
Yuya Nishihara <yuya@tcha.org>
parents: 38267
diff changeset
1278 (keyword 'rev' does not support map operation)
28349
7cb2f2438f85 templater: handle exception when applying map operator to non-iterable object
Yuya Nishihara <yuya@tcha.org>
parents: 28346
diff changeset
1279 [255]
7cb2f2438f85 templater: handle exception when applying map operator to non-iterable object
Yuya Nishihara <yuya@tcha.org>
parents: 28346
diff changeset
1280 $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n'
37404
7c902a8345ef templater: complain about invalid application of '%' operator (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 37229
diff changeset
1281 hg: parse error: None is not iterable of mappings
7c902a8345ef templater: complain about invalid application of '%' operator (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 37229
diff changeset
1282 [255]
7c902a8345ef templater: complain about invalid application of '%' operator (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 37229
diff changeset
1283 $ hg log -R latesttag -r tip -T '{extras % "{key}\n" % "{key}\n"}'
37499
75c13343cf38 templater: wrap result of '%' operation so it never looks like a thunk
Yuya Nishihara <yuya@tcha.org>
parents: 37418
diff changeset
1284 hg: parse error: list of strings is not mappable
28349
7cb2f2438f85 templater: handle exception when applying map operator to non-iterable object
Yuya Nishihara <yuya@tcha.org>
parents: 28346
diff changeset
1285 [255]
7cb2f2438f85 templater: handle exception when applying map operator to non-iterable object
Yuya Nishihara <yuya@tcha.org>
parents: 28346
diff changeset
1286
34330
89aec1834a86 templatekw: add new-style template expansion to {manifest}
Yuya Nishihara <yuya@tcha.org>
parents: 34329
diff changeset
1287 Test new-style inline templating of non-list/dict type:
89aec1834a86 templatekw: add new-style template expansion to {manifest}
Yuya Nishihara <yuya@tcha.org>
parents: 34329
diff changeset
1288
89aec1834a86 templatekw: add new-style template expansion to {manifest}
Yuya Nishihara <yuya@tcha.org>
parents: 34329
diff changeset
1289 $ hg log -R latesttag -r tip -T '{manifest}\n'
89aec1834a86 templatekw: add new-style template expansion to {manifest}
Yuya Nishihara <yuya@tcha.org>
parents: 34329
diff changeset
1290 11:2bc6e9006ce2
89aec1834a86 templatekw: add new-style template expansion to {manifest}
Yuya Nishihara <yuya@tcha.org>
parents: 34329
diff changeset
1291 $ hg log -R latesttag -r tip -T 'string length: {manifest|count}\n'
89aec1834a86 templatekw: add new-style template expansion to {manifest}
Yuya Nishihara <yuya@tcha.org>
parents: 34329
diff changeset
1292 string length: 15
89aec1834a86 templatekw: add new-style template expansion to {manifest}
Yuya Nishihara <yuya@tcha.org>
parents: 34329
diff changeset
1293 $ hg log -R latesttag -r tip -T '{manifest % "{rev}:{node}"}\n'
89aec1834a86 templatekw: add new-style template expansion to {manifest}
Yuya Nishihara <yuya@tcha.org>
parents: 34329
diff changeset
1294 11:2bc6e9006ce29882383a22d39fd1f4e66dd3e2fc
89aec1834a86 templatekw: add new-style template expansion to {manifest}
Yuya Nishihara <yuya@tcha.org>
parents: 34329
diff changeset
1295
34534
b3073e175c17 templater: wrap get/min/max result so map operation can apply to element
Yuya Nishihara <yuya@tcha.org>
parents: 34330
diff changeset
1296 $ hg log -R latesttag -r tip -T '{get(extras, "branch") % "{key}: {value}\n"}'
b3073e175c17 templater: wrap get/min/max result so map operation can apply to element
Yuya Nishihara <yuya@tcha.org>
parents: 34330
diff changeset
1297 branch: default
b3073e175c17 templater: wrap get/min/max result so map operation can apply to element
Yuya Nishihara <yuya@tcha.org>
parents: 34330
diff changeset
1298 $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "{key}\n"}'
37404
7c902a8345ef templater: complain about invalid application of '%' operator (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 37229
diff changeset
1299 hg: parse error: None is not iterable of mappings
34534
b3073e175c17 templater: wrap get/min/max result so map operation can apply to element
Yuya Nishihara <yuya@tcha.org>
parents: 34330
diff changeset
1300 [255]
b3073e175c17 templater: wrap get/min/max result so map operation can apply to element
Yuya Nishihara <yuya@tcha.org>
parents: 34330
diff changeset
1301 $ hg log -R latesttag -r tip -T '{min(extras) % "{key}: {value}\n"}'
b3073e175c17 templater: wrap get/min/max result so map operation can apply to element
Yuya Nishihara <yuya@tcha.org>
parents: 34330
diff changeset
1302 branch: default
b3073e175c17 templater: wrap get/min/max result so map operation can apply to element
Yuya Nishihara <yuya@tcha.org>
parents: 34330
diff changeset
1303 $ hg log -R latesttag -l1 -T '{min(revset("0:9")) % "{rev}:{node|short}\n"}'
b3073e175c17 templater: wrap get/min/max result so map operation can apply to element
Yuya Nishihara <yuya@tcha.org>
parents: 34330
diff changeset
1304 0:ce3cec86e6c2
b3073e175c17 templater: wrap get/min/max result so map operation can apply to element
Yuya Nishihara <yuya@tcha.org>
parents: 34330
diff changeset
1305 $ hg log -R latesttag -l1 -T '{max(revset("0:9")) % "{rev}:{node|short}\n"}'
b3073e175c17 templater: wrap get/min/max result so map operation can apply to element
Yuya Nishihara <yuya@tcha.org>
parents: 34330
diff changeset
1306 9:fbc7cd862e9c
b3073e175c17 templater: wrap get/min/max result so map operation can apply to element
Yuya Nishihara <yuya@tcha.org>
parents: 34330
diff changeset
1307
34535
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1308 Test dot operator precedence:
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1309
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1310 $ hg debugtemplate -R latesttag -r0 -v '{manifest.node|short}\n'
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1311 (template
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1312 (|
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1313 (.
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1314 (symbol 'manifest')
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1315 (symbol 'node'))
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1316 (symbol 'short'))
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1317 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1318 * keywords: manifest, node, rev
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1319 * functions: formatnode, short
34535
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1320 89f4071fec70
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1321
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1322 (the following examples are invalid, but seem natural in parsing POV)
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1323
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1324 $ hg debugtemplate -R latesttag -r0 -v '{foo|bar.baz}\n' 2> /dev/null
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1325 (template
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1326 (|
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1327 (symbol 'foo')
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1328 (.
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1329 (symbol 'bar')
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1330 (symbol 'baz')))
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1331 (string '\n'))
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1332 [255]
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1333 $ hg debugtemplate -R latesttag -r0 -v '{foo.bar()}\n' 2> /dev/null
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1334 (template
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1335 (.
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1336 (symbol 'foo')
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1337 (func
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1338 (symbol 'bar')
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1339 None))
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1340 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1341 * keywords: foo
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1342 * functions: bar
34535
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1343 [255]
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1344
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1345 Test evaluation of dot operator:
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1346
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1347 $ hg log -R latesttag -l1 -T '{min(revset("0:9")).node}\n'
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1348 ce3cec86e6c26bd9bdfc590a6b92abc9680f1796
34536
4c1cfe54c08d templater: extend dot operator as a short for get(dict, key)
Yuya Nishihara <yuya@tcha.org>
parents: 34535
diff changeset
1349 $ hg log -R latesttag -r0 -T '{extras.branch}\n'
4c1cfe54c08d templater: extend dot operator as a short for get(dict, key)
Yuya Nishihara <yuya@tcha.org>
parents: 34535
diff changeset
1350 default
38286
851fc9d42d6d templater: make date wrapper support dot/map operations
Yuya Nishihara <yuya@tcha.org>
parents: 38285
diff changeset
1351 $ hg log -R latesttag -r0 -T '{date.unixtime} {localdate(date, "+0200").tzoffset}\n'
851fc9d42d6d templater: make date wrapper support dot/map operations
Yuya Nishihara <yuya@tcha.org>
parents: 38285
diff changeset
1352 0 -7200
34535
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1353
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1354 $ hg log -R latesttag -l1 -T '{author.invalid}\n'
38243
06d11cd90516 templater: promote getmember() to an interface of wrapped types
Yuya Nishihara <yuya@tcha.org>
parents: 38229
diff changeset
1355 hg: parse error: 'test' is not a dictionary
06d11cd90516 templater: promote getmember() to an interface of wrapped types
Yuya Nishihara <yuya@tcha.org>
parents: 38229
diff changeset
1356 (keyword 'author' does not support member operation)
34535
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1357 [255]
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1358 $ hg log -R latesttag -l1 -T '{min("abc").invalid}\n'
38243
06d11cd90516 templater: promote getmember() to an interface of wrapped types
Yuya Nishihara <yuya@tcha.org>
parents: 38229
diff changeset
1359 hg: parse error: 'a' is not a dictionary
34535
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1360 [255]
78590585c0db templater: add dot operator to easily access a sub item
Yuya Nishihara <yuya@tcha.org>
parents: 34534
diff changeset
1361
25002
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1362 Test integer literal:
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1363
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1364 $ hg debugtemplate -v '{(0)}\n'
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1365 (template
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1366 (group
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1367 (integer '0'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1368 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1369 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1370 * functions:
25002
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1371 0
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1372 $ hg debugtemplate -v '{(123)}\n'
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1373 (template
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1374 (group
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1375 (integer '123'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1376 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1377 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1378 * functions:
25002
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1379 123
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1380 $ hg debugtemplate -v '{(-4)}\n'
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1381 (template
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1382 (group
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
1383 (negate
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1384 (integer '4')))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1385 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1386 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1387 * functions:
25002
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1388 -4
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1389 $ hg debugtemplate '{(-)}\n'
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
1390 hg: parse error at 3: not a prefix: )
36669
80d7fb6c2dec templater: add hint to template parse errors to help locate issues
Ryan McElroy <rmcelroy@fb.com>
parents: 36635
diff changeset
1391 ({(-)}\n
36691
1b179d151578 templater: fix position of terminator character in error message
Yuya Nishihara <yuya@tcha.org>
parents: 36669
diff changeset
1392 ^ here)
25002
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1393 [255]
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1394 $ hg debugtemplate '{(-a)}\n'
30115
8e42dfde93d1 templater: provide arithmetic operations on integers
Simon Farnsworth <simonfar@fb.com>
parents: 30088
diff changeset
1395 hg: parse error: negation needs an integer argument
25002
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1396 [255]
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1397
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1398 top-level integer literal is interpreted as symbol (i.e. variable name):
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1399
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1400 $ hg debugtemplate -D 1=one -v '{1}\n'
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1401 (template
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1402 (integer '1')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1403 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1404 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1405 * functions:
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1406 one
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1407 $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n'
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1408 (template
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1409 (func
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1410 (symbol 'if')
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1411 (list
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1412 (string 't')
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1413 (template
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1414 (integer '1'))))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1415 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1416 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1417 * functions: if
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1418 one
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1419 $ hg debugtemplate -D 1=one -v '{1|stringify}\n'
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1420 (template
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1421 (|
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1422 (integer '1')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1423 (symbol 'stringify'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1424 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1425 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1426 * functions: stringify
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1427 one
25002
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1428
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1429 unless explicit symbol is expected:
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1430
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1431 $ hg log -Ra -r0 -T '{desc|1}\n'
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1432 hg: parse error: expected a symbol, got 'integer'
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1433 [255]
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1434 $ hg log -Ra -r0 -T '{1()}\n'
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1435 hg: parse error: expected a symbol, got 'integer'
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1436 [255]
829faf8ab605 templater: tokenize decimal integer literal (issue4638) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24985
diff changeset
1437
25596
c1975809a6b5 templater: take any string literals as template, but not for rawstring (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25580
diff changeset
1438 Test string literal:
c1975809a6b5 templater: take any string literals as template, but not for rawstring (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25580
diff changeset
1439
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1440 $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n'
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1441 (template
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1442 (string 'string with no template fragment')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1443 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1444 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1445 * functions:
25596
c1975809a6b5 templater: take any string literals as template, but not for rawstring (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25580
diff changeset
1446 string with no template fragment
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1447 $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n'
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1448 (template
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1449 (template
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1450 (string 'template: ')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1451 (symbol 'rev'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1452 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1453 * keywords: rev
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1454 * functions:
25596
c1975809a6b5 templater: take any string literals as template, but not for rawstring (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25580
diff changeset
1455 template: 0
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1456 $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n'
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1457 (template
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1458 (string 'rawstring: {rev}')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1459 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1460 * keywords:
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1461 * functions:
25596
c1975809a6b5 templater: take any string literals as template, but not for rawstring (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25580
diff changeset
1462 rawstring: {rev}
28548
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1463 $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n'
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1464 (template
b7a31068cc80 templater: add debugtemplate command
Yuya Nishihara <yuya@tcha.org>
parents: 28546
diff changeset
1465 (%
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1466 (symbol 'files')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1467 (string 'rawstring: {file}'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1468 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1469 * keywords: files
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1470 * functions:
28546
1987ed32efca templater: relax type of mapped template
Yuya Nishihara <yuya@tcha.org>
parents: 28374
diff changeset
1471 rawstring: {file}
25597
fd5bc660c9f0 templater: do not reevaluate rawstring as template (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25596
diff changeset
1472
20066
64b4f0cd7336 templater: fix escaping in nested string literals (issue4102)
Matt Mackall <mpm@selenic.com>
parents: 19770
diff changeset
1473 Test string escaping:
64b4f0cd7336 templater: fix escaping in nested string literals (issue4102)
Matt Mackall <mpm@selenic.com>
parents: 19770
diff changeset
1474
64b4f0cd7336 templater: fix escaping in nested string literals (issue4102)
Matt Mackall <mpm@selenic.com>
parents: 19770
diff changeset
1475 $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
64b4f0cd7336 templater: fix escaping in nested string literals (issue4102)
Matt Mackall <mpm@selenic.com>
parents: 19770
diff changeset
1476 >
64b4f0cd7336 templater: fix escaping in nested string literals (issue4102)
Matt Mackall <mpm@selenic.com>
parents: 19770
diff changeset
1477 <>\n<[>
64b4f0cd7336 templater: fix escaping in nested string literals (issue4102)
Matt Mackall <mpm@selenic.com>
parents: 19770
diff changeset
1478 <>\n<]>
64b4f0cd7336 templater: fix escaping in nested string literals (issue4102)
Matt Mackall <mpm@selenic.com>
parents: 19770
diff changeset
1479 <>\n<
20067
3d8bfe2ecf6d templater: only recursively evaluate string literals as templates (issue4103)
Matt Mackall <mpm@selenic.com>
parents: 20066
diff changeset
1480
24948
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1481 $ hg log -R latesttag -r 0 \
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1482 > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1483 >
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1484 <>\n<[>
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1485 <>\n<]>
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1486 <>\n<
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1487
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1488 $ hg log -R latesttag -r 0 -T esc \
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1489 > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1490 >
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1491 <>\n<[>
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1492 <>\n<]>
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1493 <>\n<
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1494
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1495 $ cat <<'EOF' > esctmpl
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1496 > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1497 > EOF
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1498 $ hg log -R latesttag -r 0 --style ./esctmpl
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1499 >
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1500 <>\n<[>
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1501 <>\n<]>
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1502 <>\n<
db7463aa080f templater: do not process \-escapes at parsestring() (issue4290)
Yuya Nishihara <yuya@tcha.org>
parents: 24903
diff changeset
1503
25638
6047b60cdd09 templater: fix handling of \-escapes in raw string literals
Yuya Nishihara <yuya@tcha.org>
parents: 25637
diff changeset
1504 Test string escaping of quotes:
6047b60cdd09 templater: fix handling of \-escapes in raw string literals
Yuya Nishihara <yuya@tcha.org>
parents: 25637
diff changeset
1505
6047b60cdd09 templater: fix handling of \-escapes in raw string literals
Yuya Nishihara <yuya@tcha.org>
parents: 25637
diff changeset
1506 $ hg log -Ra -r0 -T '{"\""}\n'
6047b60cdd09 templater: fix handling of \-escapes in raw string literals
Yuya Nishihara <yuya@tcha.org>
parents: 25637
diff changeset
1507 "
6047b60cdd09 templater: fix handling of \-escapes in raw string literals
Yuya Nishihara <yuya@tcha.org>
parents: 25637
diff changeset
1508 $ hg log -Ra -r0 -T '{"\\\""}\n'
6047b60cdd09 templater: fix handling of \-escapes in raw string literals
Yuya Nishihara <yuya@tcha.org>
parents: 25637
diff changeset
1509 \"
6047b60cdd09 templater: fix handling of \-escapes in raw string literals
Yuya Nishihara <yuya@tcha.org>
parents: 25637
diff changeset
1510 $ hg log -Ra -r0 -T '{r"\""}\n'
6047b60cdd09 templater: fix handling of \-escapes in raw string literals
Yuya Nishihara <yuya@tcha.org>
parents: 25637
diff changeset
1511 \"
6047b60cdd09 templater: fix handling of \-escapes in raw string literals
Yuya Nishihara <yuya@tcha.org>
parents: 25637
diff changeset
1512 $ hg log -Ra -r0 -T '{r"\\\""}\n'
6047b60cdd09 templater: fix handling of \-escapes in raw string literals
Yuya Nishihara <yuya@tcha.org>
parents: 25637
diff changeset
1513 \\\"
6047b60cdd09 templater: fix handling of \-escapes in raw string literals
Yuya Nishihara <yuya@tcha.org>
parents: 25637
diff changeset
1514
25695
ce3d4b858420 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 25676 25662
diff changeset
1515
ce3d4b858420 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 25676 25662
diff changeset
1516 $ hg log -Ra -r0 -T '{"\""}\n'
ce3d4b858420 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 25676 25662
diff changeset
1517 "
ce3d4b858420 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 25676 25662
diff changeset
1518 $ hg log -Ra -r0 -T '{"\\\""}\n'
ce3d4b858420 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 25676 25662
diff changeset
1519 \"
ce3d4b858420 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 25676 25662
diff changeset
1520 $ hg log -Ra -r0 -T '{r"\""}\n'
ce3d4b858420 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 25676 25662
diff changeset
1521 \"
ce3d4b858420 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 25676 25662
diff changeset
1522 $ hg log -Ra -r0 -T '{r"\\\""}\n'
ce3d4b858420 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 25676 25662
diff changeset
1523 \\\"
ce3d4b858420 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 25676 25662
diff changeset
1524
24966
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1525 Test exception in quoted template. single backslash before quotation mark is
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1526 stripped before parsing:
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1527
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1528 $ cat <<'EOF' > escquotetmpl
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1529 > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n"
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1530 > EOF
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1531 $ cd latesttag
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1532 $ hg log -r 2 --style ../escquotetmpl
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1533 " \" \" \\" head1
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1534
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1535 $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"'
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1536 valid
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1537 $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'"
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1538 valid
25695
ce3d4b858420 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 25676 25662
diff changeset
1539
25676
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1540 Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1541 _evalifliteral() templates (issue4733):
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1542
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1543 $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n'
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1544 "2
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1545 $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n'
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1546 "2
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1547 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n'
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1548 "2
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1549
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1550 $ hg log -r 2 -T '{if(rev, "\\\"")}\n'
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1551 \"
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1552 $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n'
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1553 \"
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1554 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n'
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1555 \"
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1556
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1557 $ hg log -r 2 -T '{if(rev, r"\\\"")}\n'
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1558 \\\"
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1559 $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n'
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1560 \\\"
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1561 $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n'
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1562 \\\"
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1563
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1564 escaped single quotes and errors:
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1565
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1566 $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n'
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1567 foo
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1568 $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n'
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1569 foo
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1570 $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n'
25783
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1571 hg: parse error at 21: unterminated string
36669
80d7fb6c2dec templater: add hint to template parse errors to help locate issues
Ryan McElroy <rmcelroy@fb.com>
parents: 36635
diff changeset
1572 ({if(rev, "{if(rev, \")}")}\n
36691
1b179d151578 templater: fix position of terminator character in error message
Yuya Nishihara <yuya@tcha.org>
parents: 36669
diff changeset
1573 ^ here)
25676
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1574 [255]
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1575 $ hg log -r 2 -T '{if(rev, \"\\"")}\n'
26215
72aad184f061 templater: create string unescape helper (issue4798)
Matt Mackall <mpm@selenic.com>
parents: 26188
diff changeset
1576 hg: parse error: trailing \ in string
25676
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1577 [255]
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1578 $ hg log -r 2 -T '{if(rev, r\"\\"")}\n'
26215
72aad184f061 templater: create string unescape helper (issue4798)
Matt Mackall <mpm@selenic.com>
parents: 26188
diff changeset
1579 hg: parse error: trailing \ in string
25676
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1580 [255]
ec9c258e666d templater: parse \"...\" as string for 2.9.2-3.4 compatibility (issue4733)
Yuya Nishihara <yuya@tcha.org>
parents: 25638
diff changeset
1581
24966
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1582 $ cd ..
554d6fcc3c84 templater: strip single backslash before quotation mark in quoted template
Yuya Nishihara <yuya@tcha.org>
parents: 24951
diff changeset
1583
24949
890845af1ac2 templater: strictly parse leading backslashes of '{' (issue4569) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24948
diff changeset
1584 Test leading backslashes:
890845af1ac2 templater: strictly parse leading backslashes of '{' (issue4569) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24948
diff changeset
1585
890845af1ac2 templater: strictly parse leading backslashes of '{' (issue4569) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24948
diff changeset
1586 $ cd latesttag
25597
fd5bc660c9f0 templater: do not reevaluate rawstring as template (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25596
diff changeset
1587 $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n'
fd5bc660c9f0 templater: do not reevaluate rawstring as template (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25596
diff changeset
1588 {rev} {file}
fd5bc660c9f0 templater: do not reevaluate rawstring as template (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25596
diff changeset
1589 $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n'
fd5bc660c9f0 templater: do not reevaluate rawstring as template (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25596
diff changeset
1590 \2 \head1
fd5bc660c9f0 templater: do not reevaluate rawstring as template (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25596
diff changeset
1591 $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n'
fd5bc660c9f0 templater: do not reevaluate rawstring as template (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25596
diff changeset
1592 \{rev} \{file}
24949
890845af1ac2 templater: strictly parse leading backslashes of '{' (issue4569) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24948
diff changeset
1593 $ cd ..
890845af1ac2 templater: strictly parse leading backslashes of '{' (issue4569) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 24948
diff changeset
1594
25471
7298da81f5a9 templater: do not preprocess template string in "if" expression (issue4714)
Yuya Nishihara <yuya@tcha.org>
parents: 24949
diff changeset
1595 Test leading backslashes in "if" expression (issue4714):
7298da81f5a9 templater: do not preprocess template string in "if" expression (issue4714)
Yuya Nishihara <yuya@tcha.org>
parents: 24949
diff changeset
1596
7298da81f5a9 templater: do not preprocess template string in "if" expression (issue4714)
Yuya Nishihara <yuya@tcha.org>
parents: 24949
diff changeset
1597 $ cd latesttag
7298da81f5a9 templater: do not preprocess template string in "if" expression (issue4714)
Yuya Nishihara <yuya@tcha.org>
parents: 24949
diff changeset
1598 $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n'
25597
fd5bc660c9f0 templater: do not reevaluate rawstring as template (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25596
diff changeset
1599 {rev} \{rev}
25471
7298da81f5a9 templater: do not preprocess template string in "if" expression (issue4714)
Yuya Nishihara <yuya@tcha.org>
parents: 24949
diff changeset
1600 $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n'
25597
fd5bc660c9f0 templater: do not reevaluate rawstring as template (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25596
diff changeset
1601 \2 \\{rev}
25471
7298da81f5a9 templater: do not preprocess template string in "if" expression (issue4714)
Yuya Nishihara <yuya@tcha.org>
parents: 24949
diff changeset
1602 $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n'
25597
fd5bc660c9f0 templater: do not reevaluate rawstring as template (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 25596
diff changeset
1603 \{rev} \\\{rev}
25471
7298da81f5a9 templater: do not preprocess template string in "if" expression (issue4714)
Yuya Nishihara <yuya@tcha.org>
parents: 24949
diff changeset
1604 $ cd ..
7298da81f5a9 templater: do not preprocess template string in "if" expression (issue4714)
Yuya Nishihara <yuya@tcha.org>
parents: 24949
diff changeset
1605
20663
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1606 "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice)
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1607
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1608 $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1609 \x6e
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1610 $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1611 \x5c\x786e
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1612 $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1613 \x6e
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1614 $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1615 \x5c\x786e
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1616
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1617 $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1618 \x6e
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1619 $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1620 \x5c\x786e
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1621 $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1622 \x6e
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1623 $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1624 \x5c\x786e
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1625
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1626 $ hg log -R a -r 8 --template '{join(files, "\n")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1627 fourth
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1628 second
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1629 third
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1630 $ hg log -R a -r 8 --template '{join(files, r"\n")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1631 fourth\nsecond\nthird
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1632
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1633 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1634 <p>
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1635 1st
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1636 </p>
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1637 <p>
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1638 2nd
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1639 </p>
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1640 $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1641 <p>
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1642 1st\n\n2nd
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1643 </p>
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1644 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1645 1st
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1646
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1647 2nd
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1648
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1649 $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1650 o perso
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1651 $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1652 no person
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1653 $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1654 o perso
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1655 $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1656 no perso
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1657
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1658 $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1659 -o perso-
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1660 $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1661 no person
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1662 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1663 \x2do perso\x2d
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1664 $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1665 -o perso-
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1666 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1667 \x2do perso\x6e
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1668
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1669 $ hg log -R a -r 8 --template '{files % "{file}\n"}'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1670 fourth
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1671 second
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1672 third
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1673
21024
7731a2281cf0 spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents: 20860
diff changeset
1674 Test string escaping in nested expression:
20663
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1675
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1676 $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1677 fourth\x6esecond\x6ethird
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1678 $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1679 fourth\x6esecond\x6ethird
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1680
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1681 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1682 fourth\x6esecond\x6ethird
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1683 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1684 fourth\x5c\x786esecond\x5c\x786ethird
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1685
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1686 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1687 3:\x6eo user, \x6eo domai\x6e
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1688 4:\x5c\x786eew bra\x5c\x786ech
5ab28a2e9962 templater: make strings in template expressions be "string-escape"-ed correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20662
diff changeset
1689
25783
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1690 Test quotes in nested expression are evaluated just like a $(command)
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1691 substitution in POSIX shells:
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1692
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1693 $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n'
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1694 8:95c24699272e
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1695 $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n'
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1696 {8} "95c24699272e"
1f6878c87c25 templater: introduce one-pass parsing of nested template strings
Yuya Nishihara <yuya@tcha.org>
parents: 25782
diff changeset
1697
20067
3d8bfe2ecf6d templater: only recursively evaluate string literals as templates (issue4103)
Matt Mackall <mpm@selenic.com>
parents: 20066
diff changeset
1698 Test recursive evaluation:
3d8bfe2ecf6d templater: only recursively evaluate string literals as templates (issue4103)
Matt Mackall <mpm@selenic.com>
parents: 20066
diff changeset
1699
3d8bfe2ecf6d templater: only recursively evaluate string literals as templates (issue4103)
Matt Mackall <mpm@selenic.com>
parents: 20066
diff changeset
1700 $ hg init r
3d8bfe2ecf6d templater: only recursively evaluate string literals as templates (issue4103)
Matt Mackall <mpm@selenic.com>
parents: 20066
diff changeset
1701 $ cd r
3d8bfe2ecf6d templater: only recursively evaluate string literals as templates (issue4103)
Matt Mackall <mpm@selenic.com>
parents: 20066
diff changeset
1702 $ echo a > a
3d8bfe2ecf6d templater: only recursively evaluate string literals as templates (issue4103)
Matt Mackall <mpm@selenic.com>
parents: 20066
diff changeset
1703 $ hg ci -Am '{rev}'
3d8bfe2ecf6d templater: only recursively evaluate string literals as templates (issue4103)
Matt Mackall <mpm@selenic.com>
parents: 20066
diff changeset
1704 adding a
3d8bfe2ecf6d templater: only recursively evaluate string literals as templates (issue4103)
Matt Mackall <mpm@selenic.com>
parents: 20066
diff changeset
1705 $ hg log -r 0 --template '{if(rev, desc)}\n'
3d8bfe2ecf6d templater: only recursively evaluate string literals as templates (issue4103)
Matt Mackall <mpm@selenic.com>
parents: 20066
diff changeset
1706 {rev}
3d8bfe2ecf6d templater: only recursively evaluate string literals as templates (issue4103)
Matt Mackall <mpm@selenic.com>
parents: 20066
diff changeset
1707 $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
3d8bfe2ecf6d templater: only recursively evaluate string literals as templates (issue4103)
Matt Mackall <mpm@selenic.com>
parents: 20066
diff changeset
1708 test 0
20076
faa4b3fc4197 templater: makes branches work correctly with stringify (issue4108)
Matt Mackall <mpm@selenic.com>
parents: 20067
diff changeset
1709
20661
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1710 $ hg branch -q 'text.{rev}'
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1711 $ echo aa >> aa
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1712 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1713
20670
0084fcd5d7e2 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 20668 20663
diff changeset
1714 $ hg log -l1 --template '{fill(desc, "20", author, branch)}'
20661
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1715 {node|short}desc to
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1716 text.{rev}be wrapped
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1717 text.{rev}desc to be
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1718 text.{rev}wrapped (no-eol)
20670
0084fcd5d7e2 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 20668 20663
diff changeset
1719 $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}'
20661
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1720 bcc7ff960b8e:desc to
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1721 text.1:be wrapped
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1722 text.1:desc to be
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1723 text.1:wrapped (no-eol)
28344
ac371d4c007f templater: drop redundant type conversion when evaluating integer argument
Yuya Nishihara <yuya@tcha.org>
parents: 28333
diff changeset
1724 $ hg log -l1 -T '{fill(desc, date, "", "")}\n'
ac371d4c007f templater: drop redundant type conversion when evaluating integer argument
Yuya Nishihara <yuya@tcha.org>
parents: 28333
diff changeset
1725 hg: parse error: fill expects an integer width
ac371d4c007f templater: drop redundant type conversion when evaluating integer argument
Yuya Nishihara <yuya@tcha.org>
parents: 28333
diff changeset
1726 [255]
20661
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1727
30088
d1f5f158768e template: provide a termwidth keyword (issue5395)
Simon Farnsworth <simonfar@fb.com>
parents: 30083
diff changeset
1728 $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}'
d1f5f158768e template: provide a termwidth keyword (issue5395)
Simon Farnsworth <simonfar@fb.com>
parents: 30083
diff changeset
1729 bcc7ff960b8e:desc to be
d1f5f158768e template: provide a termwidth keyword (issue5395)
Simon Farnsworth <simonfar@fb.com>
parents: 30083
diff changeset
1730 termwidth.1:wrapped desc
d1f5f158768e template: provide a termwidth keyword (issue5395)
Simon Farnsworth <simonfar@fb.com>
parents: 30083
diff changeset
1731 termwidth.1:to be wrapped (no-eol)
d1f5f158768e template: provide a termwidth keyword (issue5395)
Simon Farnsworth <simonfar@fb.com>
parents: 30083
diff changeset
1732
20670
0084fcd5d7e2 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 20668 20663
diff changeset
1733 $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
20661
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1734 {node|short} (no-eol)
20670
0084fcd5d7e2 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 20668 20663
diff changeset
1735 $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}'
20661
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1736 bcc-ff---b-e (no-eol)
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1737
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1738 $ cat >> .hg/hgrc <<EOF
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1739 > [extensions]
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1740 > color=
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1741 > [color]
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1742 > mode=ansi
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1743 > text.{rev} = red
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1744 > text.1 = green
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1745 > EOF
20670
0084fcd5d7e2 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 20668 20663
diff changeset
1746 $ hg log --color=always -l 1 --template '{label(branch, "text\n")}'
20661
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1747 \x1b[0;31mtext\x1b[0m (esc)
20670
0084fcd5d7e2 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 20668 20663
diff changeset
1748 $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}'
20661
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1749 \x1b[0;32mtext\x1b[0m (esc)
7e627fe63e5e templater: avoid recursive evaluation of string literals completely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20079
diff changeset
1750
38434
70f551a3f52e tests: extract test-template-functions.t from test-command-template.t
Yuya Nishihara <yuya@tcha.org>
parents: 38433
diff changeset
1751 Just one more commit:
20369
9c6b86dd2ed2 template: add shortest(node) template function
Durham Goode <durham@fb.com>
parents: 20079
diff changeset
1752
9c6b86dd2ed2 template: add shortest(node) template function
Durham Goode <durham@fb.com>
parents: 20079
diff changeset
1753 $ echo b > b
9c6b86dd2ed2 template: add shortest(node) template function
Durham Goode <durham@fb.com>
parents: 20079
diff changeset
1754 $ hg ci -qAm b
35561
4c3a4bb31c0e revsetlang: raise ParseError to report invalid format character
Yuya Nishihara <yuya@tcha.org>
parents: 35470
diff changeset
1755
37105
e7bc0667c521 formatter: make 'originalnode' a thing in log-like templates
Yuya Nishihara <yuya@tcha.org>
parents: 37015
diff changeset
1756 Test 'originalnode'
e7bc0667c521 formatter: make 'originalnode' a thing in log-like templates
Yuya Nishihara <yuya@tcha.org>
parents: 37015
diff changeset
1757
e7bc0667c521 formatter: make 'originalnode' a thing in log-like templates
Yuya Nishihara <yuya@tcha.org>
parents: 37015
diff changeset
1758 $ hg log -r 1 -T '{revset("null") % "{node|short} {originalnode|short}"}\n'
e7bc0667c521 formatter: make 'originalnode' a thing in log-like templates
Yuya Nishihara <yuya@tcha.org>
parents: 37015
diff changeset
1759 000000000000 bcc7ff960b8e
e7bc0667c521 formatter: make 'originalnode' a thing in log-like templates
Yuya Nishihara <yuya@tcha.org>
parents: 37015
diff changeset
1760 $ hg log -r 0 -T '{manifest % "{node} {originalnode}"}\n'
e7bc0667c521 formatter: make 'originalnode' a thing in log-like templates
Yuya Nishihara <yuya@tcha.org>
parents: 37015
diff changeset
1761 a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 f7769ec2ab975ad19684098ad1ffd9b81ecc71a1
e7bc0667c521 formatter: make 'originalnode' a thing in log-like templates
Yuya Nishihara <yuya@tcha.org>
parents: 37015
diff changeset
1762
25349
62da2d7745f9 commands: rename current to active in variables and comments
Ryan McElroy <rmcelroy@fb.com>
parents: 25348
diff changeset
1763 Test active bookmark templating
20520
5c65ee4193e1 template: add 'current' to scope during {bookmarks % ...}
Durham Goode <durham@fb.com>
parents: 20519
diff changeset
1764
5c65ee4193e1 template: add 'current' to scope during {bookmarks % ...}
Durham Goode <durham@fb.com>
parents: 20519
diff changeset
1765 $ hg book foo
5c65ee4193e1 template: add 'current' to scope during {bookmarks % ...}
Durham Goode <durham@fb.com>
parents: 20519
diff changeset
1766 $ hg book bar
25348
f26efa4f0eff templatekw: introduce active subkeyword from bookmarks keyword
Ryan McElroy <rmcelroy@fb.com>
parents: 25014
diff changeset
1767 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n"
20670
0084fcd5d7e2 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 20668 20663
diff changeset
1768 2 bar* foo
0084fcd5d7e2 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 20668 20663
diff changeset
1769 1
20520
5c65ee4193e1 template: add 'current' to scope during {bookmarks % ...}
Durham Goode <durham@fb.com>
parents: 20519
diff changeset
1770 0
25014
7e5d5160073b templatekw: replace currentbookmark with activebookmark keyword
Ryan McElroy <rmcelroy@fb.com>
parents: 25007
diff changeset
1771 $ hg log --template "{rev} {activebookmark}\n"
21896
2b41ee1b5ea1 templatekw: add 'currentbookmark' keyword to show current bookmark easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21846
diff changeset
1772 2 bar
2b41ee1b5ea1 templatekw: add 'currentbookmark' keyword to show current bookmark easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21846
diff changeset
1773 1
2b41ee1b5ea1 templatekw: add 'currentbookmark' keyword to show current bookmark easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21846
diff changeset
1774 0
2b41ee1b5ea1 templatekw: add 'currentbookmark' keyword to show current bookmark easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21846
diff changeset
1775 $ hg bookmarks --inactive bar
25014
7e5d5160073b templatekw: replace currentbookmark with activebookmark keyword
Ryan McElroy <rmcelroy@fb.com>
parents: 25007
diff changeset
1776 $ hg log --template "{rev} {activebookmark}\n"
21896
2b41ee1b5ea1 templatekw: add 'currentbookmark' keyword to show current bookmark easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21846
diff changeset
1777 2
2b41ee1b5ea1 templatekw: add 'currentbookmark' keyword to show current bookmark easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21846
diff changeset
1778 1
2b41ee1b5ea1 templatekw: add 'currentbookmark' keyword to show current bookmark easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21846
diff changeset
1779 0
24157
d091f62be5ae templatekw: fix {join(bookmarks, sep)} to always show associated bookmarks
Yuya Nishihara <yuya@tcha.org>
parents: 23735
diff changeset
1780 $ hg book -r1 baz
d091f62be5ae templatekw: fix {join(bookmarks, sep)} to always show associated bookmarks
Yuya Nishihara <yuya@tcha.org>
parents: 23735
diff changeset
1781 $ hg log --template "{rev} {join(bookmarks, ' ')}\n"
d091f62be5ae templatekw: fix {join(bookmarks, sep)} to always show associated bookmarks
Yuya Nishihara <yuya@tcha.org>
parents: 23735
diff changeset
1782 2 bar foo
d091f62be5ae templatekw: fix {join(bookmarks, sep)} to always show associated bookmarks
Yuya Nishihara <yuya@tcha.org>
parents: 23735
diff changeset
1783 1 baz
d091f62be5ae templatekw: fix {join(bookmarks, sep)} to always show associated bookmarks
Yuya Nishihara <yuya@tcha.org>
parents: 23735
diff changeset
1784 0
24240
bd504d90588d templater: implement _hybrid.__contains__ so that ifcontains can accept dict
Yuya Nishihara <yuya@tcha.org>
parents: 24157
diff changeset
1785 $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n"
bd504d90588d templater: implement _hybrid.__contains__ so that ifcontains can accept dict
Yuya Nishihara <yuya@tcha.org>
parents: 24157
diff changeset
1786 2 t
bd504d90588d templater: implement _hybrid.__contains__ so that ifcontains can accept dict
Yuya Nishihara <yuya@tcha.org>
parents: 24157
diff changeset
1787 1 f
bd504d90588d templater: implement _hybrid.__contains__ so that ifcontains can accept dict
Yuya Nishihara <yuya@tcha.org>
parents: 24157
diff changeset
1788 0 f
20662
a54c0d830499 templater: apply "stringify()" on sub expression to get string correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20661
diff changeset
1789
27894
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1790 Test namespaces dict
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1791
33048
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1792 $ hg --config extensions.revnamesext=$TESTDIR/revnamesext.py log -T '{rev}\n{namespaces % " {namespace} color={colorname} builtin={builtin}\n {join(names, ",")}\n"}\n'
33047
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1793 2
33048
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1794 bookmarks color=bookmark builtin=True
33047
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1795 bar,foo
33048
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1796 tags color=tag builtin=True
33047
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1797 tip
33048
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1798 branches color=branch builtin=True
33047
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1799 text.{rev}
33048
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1800 revnames color=revname builtin=False
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1801 r2
33047
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1802
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1803 1
33048
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1804 bookmarks color=bookmark builtin=True
33047
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1805 baz
33048
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1806 tags color=tag builtin=True
33047
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1807
33048
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1808 branches color=branch builtin=True
33047
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1809 text.{rev}
33048
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1810 revnames color=revname builtin=False
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1811 r1
33047
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1812
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1813 0
33048
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1814 bookmarks color=bookmark builtin=True
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1815
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1816 tags color=tag builtin=True
33047
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1817
33048
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1818 branches color=branch builtin=True
33047
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1819 default
33048
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1820 revnames color=revname builtin=False
46fa46608ca5 namespaces: record and expose whether namespace is built-in
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33047
diff changeset
1821 r0
33047
de8e3681c402 templatekw: expose color name in {namespaces} entries
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32953
diff changeset
1822
27894
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1823 $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}'
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1824 bookmarks: bar foo
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1825 tags: tip
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1826 branches: text.{rev}
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1827 $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}'
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1828 bookmarks:
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1829 bar
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1830 foo
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1831 tags:
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1832 tip
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1833 branches:
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1834 text.{rev}
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1835 $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}'
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1836 bar
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1837 foo
34541
0a0a72c043ac templatekw: allow accessing to nested namespace item by its template name
Yuya Nishihara <yuya@tcha.org>
parents: 34536
diff changeset
1838 $ hg log -r2 -T '{namespaces.bookmarks % "{bookmark}\n"}'
0a0a72c043ac templatekw: allow accessing to nested namespace item by its template name
Yuya Nishihara <yuya@tcha.org>
parents: 34536
diff changeset
1839 bar
0a0a72c043ac templatekw: allow accessing to nested namespace item by its template name
Yuya Nishihara <yuya@tcha.org>
parents: 34536
diff changeset
1840 foo
27894
a94f7eef3199 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org>
parents: 26856
diff changeset
1841
20670
0084fcd5d7e2 merge with stable
Matt Mackall <mpm@selenic.com>
parents: 20668 20663
diff changeset
1842 $ cd ..
21822
028a48105191 templater: add symbol to error
Ryan McElroy <rmcelroy@fb.com>
parents: 21821
diff changeset
1843
028a48105191 templater: add symbol to error
Ryan McElroy <rmcelroy@fb.com>
parents: 21821
diff changeset
1844 Test bad template with better error message
028a48105191 templater: add symbol to error
Ryan McElroy <rmcelroy@fb.com>
parents: 21821
diff changeset
1845
028a48105191 templater: add symbol to error
Ryan McElroy <rmcelroy@fb.com>
parents: 21821
diff changeset
1846 $ hg log -Gv -R a --template '{desc|user()}'
028a48105191 templater: add symbol to error
Ryan McElroy <rmcelroy@fb.com>
parents: 21821
diff changeset
1847 hg: parse error: expected a symbol, got 'func'
028a48105191 templater: add symbol to error
Ryan McElroy <rmcelroy@fb.com>
parents: 21821
diff changeset
1848 [255]
21846
8f23f8096606 templater: introduce word function
Ryan McElroy <rmcelroy@fb.com>
parents: 21822
diff changeset
1849
26215
72aad184f061 templater: create string unescape helper (issue4798)
Matt Mackall <mpm@selenic.com>
parents: 26188
diff changeset
1850 Test broken string escapes:
72aad184f061 templater: create string unescape helper (issue4798)
Matt Mackall <mpm@selenic.com>
parents: 26188
diff changeset
1851
72aad184f061 templater: create string unescape helper (issue4798)
Matt Mackall <mpm@selenic.com>
parents: 26188
diff changeset
1852 $ hg log -T "bogus\\" -R a
72aad184f061 templater: create string unescape helper (issue4798)
Matt Mackall <mpm@selenic.com>
parents: 26188
diff changeset
1853 hg: parse error: trailing \ in string
72aad184f061 templater: create string unescape helper (issue4798)
Matt Mackall <mpm@selenic.com>
parents: 26188
diff changeset
1854 [255]
72aad184f061 templater: create string unescape helper (issue4798)
Matt Mackall <mpm@selenic.com>
parents: 26188
diff changeset
1855 $ hg log -T "\\xy" -R a
36635
e80f8a134731 test-command-template: glob out detailed "invalid escape" message
Yuya Nishihara <yuya@tcha.org>
parents: 36548
diff changeset
1856 hg: parse error: invalid \x escape* (glob)
26215
72aad184f061 templater: create string unescape helper (issue4798)
Matt Mackall <mpm@selenic.com>
parents: 26188
diff changeset
1857 [255]
26856
baa77652be68 templatefilters: try round-trip utf-8 conversion by json filter (issue4933)
Yuya Nishihara <yuya@tcha.org>
parents: 26504
diff changeset
1858
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1859 Templater supports aliases of symbol and func() styles:
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1860
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1861 $ hg clone -q a aliases
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1862 $ cd aliases
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1863 $ cat <<EOF >> .hg/hgrc
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1864 > [templatealias]
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1865 > r = rev
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1866 > rn = "{r}:{node|short}"
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1867 > status(c, files) = files % "{c} {file}\n"
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1868 > utcdate(d) = localdate(d, "UTC")
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1869 > EOF
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1870
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1871 $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n'
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1872 (template
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1873 (symbol 'rn')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1874 (string ' ')
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1875 (|
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1876 (func
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1877 (symbol 'utcdate')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1878 (symbol 'date'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1879 (symbol 'isodate'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1880 (string '\n'))
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1881 * expanded:
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1882 (template
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1883 (template
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1884 (symbol 'rev')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1885 (string ':')
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1886 (|
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1887 (symbol 'node')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1888 (symbol 'short')))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1889 (string ' ')
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1890 (|
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1891 (func
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1892 (symbol 'localdate')
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1893 (list
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1894 (symbol 'date')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1895 (string 'UTC')))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1896 (symbol 'isodate'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1897 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1898 * keywords: date, node, rev
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1899 * functions: isodate, localdate, short
28957
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1900 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1901
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1902 $ hg debugtemplate -vr0 '{status("A", file_adds)}'
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1903 (template
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1904 (func
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1905 (symbol 'status')
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1906 (list
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1907 (string 'A')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1908 (symbol 'file_adds'))))
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1909 * expanded:
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1910 (template
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1911 (%
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1912 (symbol 'file_adds')
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1913 (template
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1914 (string 'A')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1915 (string ' ')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1916 (symbol 'file')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1917 (string '\n'))))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1918 * keywords: file, file_adds
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1919 * functions:
28957
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1920 A a
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1921
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1922 A unary function alias can be called as a filter:
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1923
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1924 $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n'
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1925 (template
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1926 (|
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1927 (|
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1928 (symbol 'date')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1929 (symbol 'utcdate'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1930 (symbol 'isodate'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1931 (string '\n'))
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1932 * expanded:
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1933 (template
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1934 (|
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1935 (func
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1936 (symbol 'localdate')
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1937 (list
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1938 (symbol 'date')
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1939 (string 'UTC')))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1940 (symbol 'isodate'))
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1941 (string '\n'))
38355
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1942 * keywords: date
d4fae9a0ab1f templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org>
parents: 38299
diff changeset
1943 * functions: isodate, localdate
28957
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1944 1970-01-12 13:46 +0000
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1945
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1946 Aliases should be applied only to command arguments and templates in hgrc.
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1947 Otherwise, our stock styles and web templates could be corrupted:
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1948
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1949 $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n'
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1950 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1951
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1952 $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"'
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1953 0:1e4e1b8f71e0 1970-01-12 13:46 +0000
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1954
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1955 $ cat <<EOF > tmpl
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1956 > changeset = 'nothing expanded:{rn}\n'
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1957 > EOF
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1958 $ hg log -r0 --style ./tmpl
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1959 nothing expanded:
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1960
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1961 Aliases in formatter:
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1962
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1963 $ hg branches -T '{pad(branch, 7)} {rn}\n'
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1964 default 6:d41e714fe50d
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1965 foo 4:bbe44766e73d
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1966
28958
77e566fe31ec ui: drop template aliases by HGPLAIN
Yuya Nishihara <yuya@tcha.org>
parents: 28957
diff changeset
1967 Aliases should honor HGPLAIN:
77e566fe31ec ui: drop template aliases by HGPLAIN
Yuya Nishihara <yuya@tcha.org>
parents: 28957
diff changeset
1968
77e566fe31ec ui: drop template aliases by HGPLAIN
Yuya Nishihara <yuya@tcha.org>
parents: 28957
diff changeset
1969 $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n'
77e566fe31ec ui: drop template aliases by HGPLAIN
Yuya Nishihara <yuya@tcha.org>
parents: 28957
diff changeset
1970 nothing expanded:
77e566fe31ec ui: drop template aliases by HGPLAIN
Yuya Nishihara <yuya@tcha.org>
parents: 28957
diff changeset
1971 $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n'
77e566fe31ec ui: drop template aliases by HGPLAIN
Yuya Nishihara <yuya@tcha.org>
parents: 28957
diff changeset
1972 0:1e4e1b8f71e0
77e566fe31ec ui: drop template aliases by HGPLAIN
Yuya Nishihara <yuya@tcha.org>
parents: 28957
diff changeset
1973
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1974 Unparsable alias:
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1975
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1976 $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}'
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1977 (template
34073
7bbc4e113e5f parser: stabilize output of prettyformat() by using byte-safe repr()
Yuya Nishihara <yuya@tcha.org>
parents: 33950
diff changeset
1978 (symbol 'bad'))
29059
8eba4cdcfd81 parser: shorten prefix of alias parsing errors
Yuya Nishihara <yuya@tcha.org>
parents: 28958
diff changeset
1979 abort: bad definition of template alias "bad": at 2: not a prefix: end
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1980 [255]
28957
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1981 $ hg log --config templatealias.bad='x(' -T '{bad}'
29059
8eba4cdcfd81 parser: shorten prefix of alias parsing errors
Yuya Nishihara <yuya@tcha.org>
parents: 28958
diff changeset
1982 abort: bad definition of template alias "bad": at 2: not a prefix: end
28957
d813132ea361 templater: load and expand aliases by template engine (API) (issue4842)
Yuya Nishihara <yuya@tcha.org>
parents: 28912
diff changeset
1983 [255]
28912
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1984
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1985 $ cd ..
867d6ba2353d templater: add parsing and expansion rules to process "templatealias" section
Yuya Nishihara <yuya@tcha.org>
parents: 28695
diff changeset
1986
28695
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
1987 Test that template function in extension is registered as expected
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
1988
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
1989 $ cd a
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
1990
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
1991 $ cat <<EOF > $TESTTMP/customfunc.py
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
1992 > from mercurial import registrar
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
1993 >
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
1994 > templatefunc = registrar.templatefunc()
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
1995 >
36548
086fc71fbb09 py3: mark all string literals in test-command-template.t as bytes
Yuya Nishihara <yuya@tcha.org>
parents: 36542
diff changeset
1996 > @templatefunc(b'custom()')
28695
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
1997 > def custom(context, mapping, args):
36548
086fc71fbb09 py3: mark all string literals in test-command-template.t as bytes
Yuya Nishihara <yuya@tcha.org>
parents: 36542
diff changeset
1998 > return b'custom'
28695
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
1999 > EOF
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
2000 $ cat <<EOF > .hg/hgrc
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
2001 > [extensions]
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
2002 > customfunc = $TESTTMP/customfunc.py
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
2003 > EOF
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
2004
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
2005 $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
2006 custom
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
2007
cc103bd0dbf9 registrar: add templatefunc to mark a function as template function (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28687
diff changeset
2008 $ cd ..
33858
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2009
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2010 Test 'graphwidth' in 'hg log' on various topologies. The key here is that the
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2011 printed graphwidths 3, 5, 7, etc. should all line up in their respective
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2012 columns. We don't care about other aspects of the graph rendering here.
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2013
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2014 $ hg init graphwidth
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2015 $ cd graphwidth
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2016
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2017 $ wrappabletext="a a a a a a a a a a a a"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2018
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2019 $ printf "first\n" > file
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2020 $ hg add file
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2021 $ hg commit -m "$wrappabletext"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2022
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2023 $ printf "first\nsecond\n" > file
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2024 $ hg commit -m "$wrappabletext"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2025
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2026 $ hg checkout 0
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2027 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2028 $ printf "third\nfirst\n" > file
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2029 $ hg commit -m "$wrappabletext"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2030 created new head
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2031
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2032 $ hg merge
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2033 merging file
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2034 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2035 (branch merge, don't forget to commit)
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2036
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2037 $ hg log --graph -T "{graphwidth}"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2038 @ 3
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2039 |
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2040 | @ 5
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2041 |/
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2042 o 3
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2043
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2044 $ hg commit -m "$wrappabletext"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2045
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2046 $ hg log --graph -T "{graphwidth}"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2047 @ 5
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2048 |\
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2049 | o 5
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2050 | |
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2051 o | 5
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2052 |/
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2053 o 3
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2054
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2055
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2056 $ hg checkout 0
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2057 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2058 $ printf "third\nfirst\nsecond\n" > file
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2059 $ hg commit -m "$wrappabletext"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2060 created new head
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2061
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2062 $ hg log --graph -T "{graphwidth}"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2063 @ 3
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2064 |
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2065 | o 7
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2066 | |\
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2067 +---o 7
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2068 | |
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2069 | o 5
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2070 |/
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2071 o 3
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2072
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2073
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2074 $ hg log --graph -T "{graphwidth}" -r 3
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2075 o 5
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2076 |\
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2077 ~ ~
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2078
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2079 $ hg log --graph -T "{graphwidth}" -r 1
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2080 o 3
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2081 |
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2082 ~
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2083
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2084 $ hg merge
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2085 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2086 (branch merge, don't forget to commit)
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2087 $ hg commit -m "$wrappabletext"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2088
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2089 $ printf "seventh\n" >> file
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2090 $ hg commit -m "$wrappabletext"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2091
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2092 $ hg log --graph -T "{graphwidth}"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2093 @ 3
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2094 |
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2095 o 5
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2096 |\
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2097 | o 5
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2098 | |
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2099 o | 7
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2100 |\ \
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2101 | o | 7
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2102 | |/
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2103 o / 5
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2104 |/
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2105 o 3
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2106
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2107
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2108 The point of graphwidth is to allow wrapping that accounts for the space taken
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2109 by the graph.
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2110
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2111 $ COLUMNS=10 hg log --graph -T "{fill(desc, termwidth - graphwidth)}"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2112 @ a a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2113 | a a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2114 | a a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2115 o a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2116 |\ a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2117 | | a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2118 | | a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2119 | o a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2120 | | a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2121 | | a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2122 | | a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2123 o | a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2124 |\ \ a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2125 | | | a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2126 | | | a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2127 | | | a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2128 | | | a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2129 | o | a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2130 | |/ a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2131 | | a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2132 | | a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2133 | | a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2134 | | a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2135 o | a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2136 |/ a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2137 | a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2138 | a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2139 o a a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2140 a a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2141 a a a a
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2142
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2143 Something tricky happens when there are elided nodes; the next drawn row of
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2144 edges can be more than one column wider, but the graph width only increases by
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2145 one column. The remaining columns are added in between the nodes.
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2146
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2147 $ hg log --graph -T "{graphwidth}" -r "0|2|4|5"
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2148 o 5
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2149 |\
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2150 | \
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2151 | :\
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2152 o : : 7
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2153 :/ /
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2154 : o 5
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2155 :/
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2156 o 3
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2157
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2158
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2159 $ cd ..
6f6c87888b22 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com>
parents: 33773
diff changeset
2160