diff -r 8eedf53547b8 -r 4f8067c94729 mercurial/revset.py --- a/mercurial/revset.py Thu Sep 23 10:59:21 2010 +0200 +++ b/mercurial/revset.py Thu Sep 23 00:02:31 2010 -0500 @@ -87,7 +87,7 @@ # helpers def getstring(x, err): - if x and (x[0] == 'string' or x[0] == 'symbol'): + if x and x[0] in ('string', 'symbol'): return x[1] raise error.ParseError(err) @@ -537,7 +537,7 @@ '-' + getstring(x[1], _("can't negate that"))), small) elif op in 'string symbol negate': return smallbonus, x # single revisions are small - elif op == 'and' or op == 'dagrange': + elif op in ('and', 'dagrange'): wa, ta = optimize(x[1], True) wb, tb = optimize(x[2], True) w = min(wa, wb)