diff -r 381f131220ad -r 40c40c6f20b8 mercurial/revset.py --- a/mercurial/revset.py Mon Sep 20 15:33:39 2010 +0200 +++ b/mercurial/revset.py Fri Sep 17 10:21:02 2010 -0500 @@ -268,7 +268,10 @@ return l def grep(repo, subset, x): - gr = re.compile(getstring(x, _("grep wants a string"))) + try: + gr = re.compile(getstring(x, _("grep wants a string"))) + except re.error, e: + raise error.ParseError(_('invalid match pattern: %s') % e) l = [] for r in subset: c = repo[r]