mercurial/revset.py
branchstable
changeset 12320 40c40c6f20b8
parent 11882 b75dea24e296
child 12321 11db6fa2961e
child 12614 f314723f36f5
--- 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]