comparison tests/test-revset.t @ 42232:29798c9ba5c9 stable

parser: fix crash by parsing "()" in keyword argument position A tree node can be either None or a tuple because x=("group", None) is reduced to x[1].
author Yuya Nishihara <yuya@tcha.org>
date Fri, 03 May 2019 20:06:03 +0900
parents c70bdd222dcd
children 838f3a094b4f
comparison
equal deleted inserted replaced
42219:724dae82c4bd 42232:29798c9ba5c9
470 hg: parse error: extra got an invalid argument 470 hg: parse error: extra got an invalid argument
471 [255] 471 [255]
472 $ log 'extra(unknown=branch)' 472 $ log 'extra(unknown=branch)'
473 hg: parse error: extra got an unexpected keyword argument 'unknown' 473 hg: parse error: extra got an unexpected keyword argument 'unknown'
474 [255] 474 [255]
475 $ log 'extra((), x)'
476 hg: parse error: first argument to extra must be a string
477 [255]
478 $ log 'extra(label=x, ())'
479 hg: parse error: extra got an invalid argument
480 [255]
475 481
476 $ try 'foo=bar|baz' 482 $ try 'foo=bar|baz'
477 (keyvalue 483 (keyvalue
478 (symbol 'foo') 484 (symbol 'foo')
479 (or 485 (or