Mercurial > hg
diff mercurial/revset.py @ 25998:a7527c5769bb
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 10 Aug 2015 15:30:28 -0500 |
parents | e9cd028f2dff b12e00a05d57 |
children | 748053b4a66b |
line wrap: on
line diff
--- a/mercurial/revset.py Sat Aug 08 18:52:59 2015 -0700 +++ b/mercurial/revset.py Mon Aug 10 15:30:28 2015 -0500 @@ -2276,8 +2276,10 @@ # (::x and not ::y)/(not ::y and ::x) have a fast path def isonly(revs, bases): return ( - revs[0] == 'func' + revs is not None + and revs[0] == 'func' and getstring(revs[1], _('not a symbol')) == 'ancestors' + and bases is not None and bases[0] == 'not' and bases[1][0] == 'func' and getstring(bases[1][1], _('not a symbol')) == 'ancestors') @@ -2309,7 +2311,7 @@ del ss[:] for y in x[1:]: w, t = optimize(y, False) - if t[0] == 'string' or t[0] == 'symbol': + if t is not None and (t[0] == 'string' or t[0] == 'symbol'): ss.append((w, t)) continue flushss()