Mercurial > hg
annotate tests/test-revset.out @ 11890:9dac951d0185 stable
templatefilters: use \uxxxx style escape for JSON string
It's embeddable in plain javascript, and also conforms to JSON standard.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 11 Aug 2010 01:06:21 +0900 |
parents | b75dea24e296 |
children | 73112cb2a6d7 40c40c6f20b8 |
rev | line source |
---|---|
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
1 marked working directory as branch a |
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
2 marked working directory as branch b |
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
3 marked working directory as branch a-b-c- |
11419 | 4 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
5 marked working directory as branch +a+b+c+ |
11419 | 6 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
7 marked working directory as branch -a-b-c- | |
8 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
9 marked working directory as branch /a/b/c/ |
11419 | 10 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
11 (branch merge, don't forget to commit) | |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
12 marked working directory as branch _a_b_c_ |
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
13 marked working directory as branch .a.b.c. |
11419 | 14 marked working directory as branch all |
15 abort: can only close branch heads | |
16 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
17 marked working directory as branch é | |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
18 % hg debugrevspec a |
11419 | 19 ('symbol', 'a') |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
20 0 |
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
21 % hg debugrevspec b-a |
11419 | 22 ('minus', ('symbol', 'b'), ('symbol', 'a')) |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
23 1 |
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
24 % hg debugrevspec _a_b_c_ |
11419 | 25 ('symbol', '_a_b_c_') |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
26 6 |
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
27 % hg debugrevspec _a_b_c_-a |
11419 | 28 ('minus', ('symbol', '_a_b_c_'), ('symbol', 'a')) |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
29 6 |
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
30 % hg debugrevspec .a.b.c. |
11419 | 31 ('symbol', '.a.b.c.') |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
32 7 |
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
33 % hg debugrevspec .a.b.c.-a |
11419 | 34 ('minus', ('symbol', '.a.b.c.'), ('symbol', 'a')) |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
35 7 |
11419 | 36 % hg debugrevspec -- -a-b-c- |
37 hg: parse error at 7: not a prefix: end | |
38 % log '-a-b-c-' | |
39 4 | |
40 % hg debugrevspec -- -a-b-c--a | |
41 ('minus', ('minus', ('minus', ('negate', ('symbol', 'a')), ('symbol', 'b')), ('symbol', 'c')), ('negate', ('symbol', 'a'))) | |
42 abort: unknown revision '-a'! | |
43 % hg debugrevspec é | |
44 ('symbol', '\xc3\xa9') | |
45 9 | |
46 % hg debugrevspec "-a-b-c-"-a | |
47 ('minus', ('string', '-a-b-c-'), ('symbol', 'a')) | |
48 4 | |
49 % log '1 or 2' | |
50 1 | |
51 2 | |
52 % log '1|2' | |
53 1 | |
54 2 | |
55 % log '1 and 2' | |
56 % log '1&2' | |
57 % hg debugrevspec 1&2|3 | |
58 ('or', ('and', ('symbol', '1'), ('symbol', '2')), ('symbol', '3')) | |
59 3 | |
60 % hg debugrevspec 1|2&3 | |
61 ('or', ('symbol', '1'), ('and', ('symbol', '2'), ('symbol', '3'))) | |
62 1 | |
63 % hg debugrevspec 1&2&3 | |
64 ('and', ('and', ('symbol', '1'), ('symbol', '2')), ('symbol', '3')) | |
65 % hg debugrevspec 1|(2|3) | |
66 ('or', ('symbol', '1'), ('group', ('or', ('symbol', '2'), ('symbol', '3')))) | |
67 1 | |
68 2 | |
69 3 | |
70 % log '1.0' | |
71 6 | |
72 % log 'a' | |
73 0 | |
74 % log '2785f51ee' | |
75 0 | |
76 % log 'date(2005)' | |
77 4 | |
78 % log 'date(this is a test)' | |
79 hg: parse error at 10: unexpected token: symbol | |
80 % log 'date()' | |
81 hg: parse error: date wants a string | |
82 % log 'date' | |
83 hg: parse error: can't use date here | |
84 % log 'date(' | |
85 hg: parse error at 5: not a prefix: end | |
86 % log 'date(tip)' | |
87 abort: invalid date: 'tip' | |
88 % log '"date"' | |
89 abort: unknown revision 'date'! | |
90 % log 'date(2005) and 1::' | |
91 4 | |
92 % log 'ancestor(1)' | |
93 hg: parse error: ancestor wants two arguments | |
94 % log 'ancestor(4,5)' | |
95 1 | |
11650
ebaf117c2642
revset: fix ancestor subset handling (issue2298)
Matt Mackall <mpm@selenic.com>
parents:
11467
diff
changeset
|
96 % log 'ancestor(4,5) and 4' |
11419 | 97 % log 'ancestors(5)' |
98 0 | |
99 1 | |
100 3 | |
101 5 | |
102 % log 'author(bob)' | |
103 2 | |
104 % log 'branch(é)' | |
105 8 | |
106 9 | |
107 % log 'children(ancestor(4,5))' | |
108 2 | |
109 3 | |
110 % log 'closed()' | |
111 % log 'contains(a)' | |
112 0 | |
113 1 | |
114 3 | |
115 5 | |
116 % log 'descendants(2 or 3)' | |
117 2 | |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
118 3 |
11419 | 119 4 |
120 5 | |
121 6 | |
122 7 | |
123 8 | |
124 9 | |
125 % log 'file(b)' | |
126 1 | |
127 4 | |
128 % log 'follow()' | |
129 0 | |
130 1 | |
131 2 | |
132 4 | |
133 8 | |
134 9 | |
135 % log 'grep("issue\d+")' | |
136 6 | |
137 % log 'head()' | |
138 0 | |
139 1 | |
140 2 | |
11409
7a6ac83a15b0
revset: add some tests
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
diff
changeset
|
141 3 |
11419 | 142 4 |
143 5 | |
144 6 | |
145 7 | |
146 9 | |
147 % log 'heads(6::)' | |
148 7 | |
149 % log 'keyword(issue)' | |
150 6 | |
151 % log 'limit(head(), 1)' | |
152 0 | |
153 % log 'max(contains(a))' | |
154 5 | |
155 % log 'merge()' | |
156 6 | |
157 % log 'modifies(b)' | |
158 4 | |
11882
b75dea24e296
revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
11650
diff
changeset
|
159 % log 'outgoing()' |
b75dea24e296
revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
11650
diff
changeset
|
160 8 |
b75dea24e296
revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
11650
diff
changeset
|
161 9 |
b75dea24e296
revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
11650
diff
changeset
|
162 % log 'outgoing("../remote1")' |
b75dea24e296
revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
11650
diff
changeset
|
163 8 |
b75dea24e296
revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
11650
diff
changeset
|
164 9 |
b75dea24e296
revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
11650
diff
changeset
|
165 % log 'outgoing("../remote2")' |
b75dea24e296
revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
11650
diff
changeset
|
166 3 |
b75dea24e296
revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
11650
diff
changeset
|
167 5 |
b75dea24e296
revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
11650
diff
changeset
|
168 6 |
b75dea24e296
revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
11650
diff
changeset
|
169 7 |
b75dea24e296
revset: fix outgoing argument handling
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
11650
diff
changeset
|
170 9 |
11419 | 171 % log 'p1(merge())' |
172 5 | |
173 % log 'p2(merge())' | |
174 4 | |
175 % log 'parents(merge())' | |
176 4 | |
177 5 | |
178 % log 'removes(a)' | |
179 2 | |
180 6 | |
181 % log 'roots(all())' | |
182 0 | |
183 % log 'reverse(2 or 3 or 4 or 5)' | |
184 5 | |
185 4 | |
186 3 | |
187 2 | |
188 % log 'sort(limit(reverse(all()), 3))' | |
189 7 | |
190 8 | |
191 9 | |
192 % log 'sort(2 or 3 or 4 or 5, date)' | |
193 2 | |
194 3 | |
195 5 | |
196 4 | |
197 % log 'tagged()' | |
198 6 | |
199 % log 'user(bob)' | |
200 2 | |
201 % log '4::8' | |
202 4 | |
203 8 | |
204 % log '4:8' | |
205 4 | |
206 5 | |
207 6 | |
208 7 | |
209 8 | |
210 % log 'sort(!merge() & (modifies(b) | user(bob) | keyword(bug) | keyword(issue) & 1::9), "-date")' | |
211 4 | |
212 2 | |
213 5 | |
11456
88abbb046e66
revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents:
11419
diff
changeset
|
214 % log 'not 0 and 0:2' |
88abbb046e66
revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents:
11419
diff
changeset
|
215 1 |
88abbb046e66
revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents:
11419
diff
changeset
|
216 2 |
88abbb046e66
revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents:
11419
diff
changeset
|
217 % log 'not 1 and 0:2' |
88abbb046e66
revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents:
11419
diff
changeset
|
218 0 |
88abbb046e66
revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents:
11419
diff
changeset
|
219 2 |
88abbb046e66
revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents:
11419
diff
changeset
|
220 % log 'not 2 and 0:2' |
88abbb046e66
revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents:
11419
diff
changeset
|
221 0 |
88abbb046e66
revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents:
11419
diff
changeset
|
222 1 |
88abbb046e66
revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents:
11419
diff
changeset
|
223 % log '(1 and 2)::' |
88abbb046e66
revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents:
11419
diff
changeset
|
224 % log '(1 and 2):' |
88abbb046e66
revset: deal with empty sets in range endpoints
Matt Mackall <mpm@selenic.com>
parents:
11419
diff
changeset
|
225 % log '(1 and 2):3' |
11467
6b836d5c8c9e
revset: make negate work for sort specs
Matt Mackall <mpm@selenic.com>
parents:
11456
diff
changeset
|
226 % log 'sort(head(), -rev)' |
6b836d5c8c9e
revset: make negate work for sort specs
Matt Mackall <mpm@selenic.com>
parents:
11456
diff
changeset
|
227 9 |
6b836d5c8c9e
revset: make negate work for sort specs
Matt Mackall <mpm@selenic.com>
parents:
11456
diff
changeset
|
228 7 |
6b836d5c8c9e
revset: make negate work for sort specs
Matt Mackall <mpm@selenic.com>
parents:
11456
diff
changeset
|
229 6 |
6b836d5c8c9e
revset: make negate work for sort specs
Matt Mackall <mpm@selenic.com>
parents:
11456
diff
changeset
|
230 5 |
6b836d5c8c9e
revset: make negate work for sort specs
Matt Mackall <mpm@selenic.com>
parents:
11456
diff
changeset
|
231 4 |
6b836d5c8c9e
revset: make negate work for sort specs
Matt Mackall <mpm@selenic.com>
parents:
11456
diff
changeset
|
232 3 |
6b836d5c8c9e
revset: make negate work for sort specs
Matt Mackall <mpm@selenic.com>
parents:
11456
diff
changeset
|
233 2 |
6b836d5c8c9e
revset: make negate work for sort specs
Matt Mackall <mpm@selenic.com>
parents:
11456
diff
changeset
|
234 1 |
6b836d5c8c9e
revset: make negate work for sort specs
Matt Mackall <mpm@selenic.com>
parents:
11456
diff
changeset
|
235 0 |