diff -r bd98d073a34f -r 8b99e9a8db05 tests/test-revset.t --- a/tests/test-revset.t Sun May 10 10:57:24 2015 -0400 +++ b/tests/test-revset.t Fri May 15 22:32:31 2015 +0900 @@ -533,6 +533,29 @@ 8 9 +Test opreand of '%' is optimized recursively (issue4670) + + $ try --optimize '8:9-8%' + (onlypost + (minus + (range + ('symbol', '8') + ('symbol', '9')) + ('symbol', '8'))) + * optimized: + (func + ('symbol', 'only') + (and + (range + ('symbol', '8') + ('symbol', '9')) + (not + ('symbol', '8')))) + * set: + + 8 + 9 + Test the order of operations $ log '7 + 9%5 + 2'