mercurial/revset.py
changeset 12321 11db6fa2961e
parent 12085 6f833fc3ccab
parent 12320 40c40c6f20b8
child 12351 b913232d13c1
--- a/mercurial/revset.py	Fri Sep 17 12:45:13 2010 -0500
+++ b/mercurial/revset.py	Mon Sep 20 15:42:58 2010 +0200
@@ -276,7 +276,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]