Show More
@@ -334,11 +334,6 b' def stringset(repo, subset, x):' | |||
|
334 | 334 | return baseset([x]) |
|
335 | 335 | return baseset() |
|
336 | 336 | |
|
337 | def symbolset(repo, subset, x): | |
|
338 | if x in symbols: | |
|
339 | raise error.ParseError(_("can't use %s here") % x) | |
|
340 | return stringset(repo, subset, x) | |
|
341 | ||
|
342 | 337 | def rangeset(repo, subset, x, y): |
|
343 | 338 | m = getset(repo, fullreposet(repo), x) |
|
344 | 339 | n = getset(repo, fullreposet(repo), y) |
@@ -2088,7 +2083,7 b' methods = {' | |||
|
2088 | 2083 | "range": rangeset, |
|
2089 | 2084 | "dagrange": dagrange, |
|
2090 | 2085 | "string": stringset, |
|
2091 |
"symbol": s |
|
|
2086 | "symbol": stringset, | |
|
2092 | 2087 | "and": andset, |
|
2093 | 2088 | "or": orset, |
|
2094 | 2089 | "not": notset, |
@@ -281,7 +281,7 b' quoting needed' | |||
|
281 | 281 | hg: parse error: date requires a string |
|
282 | 282 | [255] |
|
283 | 283 | $ log 'date' |
|
284 | hg: parse error: can't use date here | |
|
284 | abort: unknown revision 'date'! | |
|
285 | 285 | [255] |
|
286 | 286 | $ log 'date(' |
|
287 | 287 | hg: parse error at 5: not a prefix: end |
@@ -289,11 +289,40 b' quoting needed' | |||
|
289 | 289 | $ log 'date(tip)' |
|
290 | 290 | abort: invalid date: 'tip' |
|
291 | 291 | [255] |
|
292 |
$ log ' |
|
|
292 | $ log '0:date' | |
|
293 | abort: unknown revision 'date'! | |
|
294 | [255] | |
|
295 | $ log '::"date"' | |
|
293 | 296 |
abort: unknown revision 'date'! |
|
294 | 297 | [255] |
|
298 | $ hg book date -r 4 | |
|
299 | $ log '0:date' | |
|
300 | 0 | |
|
301 | 1 | |
|
302 | 2 | |
|
303 | 3 | |
|
304 | 4 | |
|
305 | $ log '::date' | |
|
306 | 0 | |
|
307 | 1 | |
|
308 | 2 | |
|
309 | 4 | |
|
310 | $ log '::"date"' | |
|
311 | 0 | |
|
312 | 1 | |
|
313 | 2 | |
|
314 | 4 | |
|
295 | 315 |
$ |
|
296 | 316 | 4 |
|
317 | $ hg book -d date | |
|
318 | ||
|
319 | Test that symbols only get parsed as functions if there's an opening | |
|
320 | parenthesis. | |
|
321 | ||
|
322 | $ hg book only -r 9 | |
|
323 | $ log 'only(only)' # Outer "only" is a function, inner "only" is the bookmark | |
|
324 | 8 | |
|
325 | 9 | |
|
297 | 326 | |
|
298 | 327 | ancestor can accept 0 or more arguments |
|
299 | 328 |
General Comments 0
You need to be logged in to leave comments.
Login now