Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 29661:5004ef47f437 stable
revset: fix keyword arguments to go through optimization process
Before, a keyvalue node was processed by the last catch-all condition of
_optimize(). Therefore, topo.firstbranch=expr would bypass tree rewriting
and would crash if an expr wasn't trivial.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 07 Aug 2016 14:58:49 +0900 |
parents | a8a5dd8986f0 |
children | 531e85eec23c |
line wrap: on
line diff
--- a/mercurial/revset.py Mon Aug 08 16:47:42 2016 +0200 +++ b/mercurial/revset.py Sun Aug 07 14:58:49 2016 +0900 @@ -2423,6 +2423,9 @@ elif op == 'list': ws, ts = zip(*(_optimize(y, small) for y in x[1:])) return sum(ws), (op,) + ts + elif op == 'keyvalue': + w, t = _optimize(x[2], small) + return w, (op, x[1], t) elif op == 'func': f = getsymbol(x[1]) wa, ta = _optimize(x[2], small)