A co-worker accidentally used an invalid operator ("AND") in a revset expression, and wasted 15 minutes trying to understand why he was getting unexpected results. From a quick experiment, it appears that revset simply stops parsing when it hits an invalid token and evaluates the expression up to that point. Expected result: abort with a clear error message, e.g. "invalid token: AND". Example: $ hg log -q -r '1 or 2' # good revset, expected output 1:273ce12ad8f1 2:ecf3fd948051 $ hg log -q -r '1 OR 2' # bad revset, unexpected output 1:273ce12ad8f1 The second example should, IMHO, die with "invalid token: OR".
I have just sent a patch to the mailing list which will trigger an parse error if a revset is not parsed completely.
Matt queued the patch: woo hoo. Thank you bernh!
Fixed by http://selenic.com/repo/hg/rev/e798e430c5e5 Bernhard Leiner <bleiner@gmail.com> revset: report a parse error if a revset is not parsed completely (issue2654) (please test the fix)
Silly robot.
...and I just confirmed manually that the fix worked. So this can stay resolved.
Setting back to resolved. Every message added while in the resolved state sets the state back to chatting. Please please don't respond with "oops, sorry".
Oh man.
Fixed by http://selenic.com/repo/hg/rev/ffcb7e4d719f Bernhard Leiner <bleiner@gmail.com> revset: report a parse error if a revset is not parsed completely (issue2654) (please test the fix)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:17 EDT --- This bug was previously known as _bug_ 2654 at http://mercurial.selenic.com/bts/issue2654