Mercurial > hg
comparison tests/test-revset.t @ 25704:70a2082f855a
revset: add parsing rule for key=value pair
It will be used as an keyword argument.
Note that our "=" operator is left-associative. In general, the assignment
operator is right-associative, but we don't care because it isn't allowed to
chain "=" operations.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 27 Jun 2015 17:05:28 +0900 |
parents | 015c0d1087a3 |
children | b7f53c474e2c |
comparison
equal
deleted
inserted
replaced
25703:1a6a117d0b95 | 25704:70a2082f855a |
---|---|
320 4 | 320 4 |
321 $ log 'date(2005) and 1::' | 321 $ log 'date(2005) and 1::' |
322 4 | 322 4 |
323 $ hg book -d date | 323 $ hg book -d date |
324 | 324 |
325 keyword arguments | |
326 | |
327 $ try 'foo=bar|baz' | |
328 (keyvalue | |
329 ('symbol', 'foo') | |
330 (or | |
331 ('symbol', 'bar') | |
332 ('symbol', 'baz'))) | |
333 hg: parse error: can't use a key-value pair in this context | |
334 [255] | |
335 | |
325 Test that symbols only get parsed as functions if there's an opening | 336 Test that symbols only get parsed as functions if there's an opening |
326 parenthesis. | 337 parenthesis. |
327 | 338 |
328 $ hg book only -r 9 | 339 $ hg book only -r 9 |
329 $ log 'only(only)' # Outer "only" is a function, inner "only" is the bookmark | 340 $ log 'only(only)' # Outer "only" is a function, inner "only" is the bookmark |