Mercurial > hg
changeset 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 | bf5d88c466e0 |
children | f5be44090ba8 9191585f2604 |
files | mercurial/revset.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
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]: