--- 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()