Mercurial > hg
changeset 29896:104914b03b83
revset: make optimize() reject unknown operators
This should have caught the bug of 'keyvalue' operator fixed at 5004ef47f437.
The catch-all pattern is useless since optimize() should be aware of all known
operators.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 07 Aug 2016 15:01:42 +0900 |
parents | b1ebc767563d |
children | 90a1886a203b |
files | mercurial/revset.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Thu Sep 01 22:06:42 2016 +0200 +++ b/mercurial/revset.py Sun Aug 07 15:01:42 2016 +0900 @@ -2463,7 +2463,7 @@ else: w = 1 return w + wa, (op, x[1], ta) - return 1, x + raise ValueError('invalid operator %r' % op) def optimize(tree): _weight, newtree = _optimize(tree, small=True)