Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 11406:42408cd43f55
revset: fix up contains/getstring when no args passed
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 19 Jun 2010 13:00:08 -0500 |
parents | 37cbedbeae96 |
children | 0f623839a5cc |
line wrap: on
line diff
--- a/mercurial/revset.py Sat Jun 19 13:00:01 2010 -0500 +++ b/mercurial/revset.py Sat Jun 19 13:00:08 2010 -0500 @@ -87,7 +87,7 @@ # helpers def getstring(x, err): - if x[0] == 'string' or x[0] == 'symbol': + if x and (x[0] == 'string' or x[0] == 'symbol'): return x[1] raise error.ParseError(err) @@ -278,7 +278,7 @@ return s def contains(repo, subset, x): - pat = getstring(x, _("file wants a pattern")) + pat = getstring(x, _("contains wants a pattern")) m = _match.match(repo.root, repo.getcwd(), [pat]) s = [] if m.files() == [pat]: