mercurial/revset.py
branchstable
changeset 14496 ffcb7e4d719f
parent 14356 02a5bebd0dc4
child 14509 4f695345979c
--- a/mercurial/revset.py	Tue May 31 15:25:43 2011 -0500
+++ b/mercurial/revset.py	Wed Mar 16 23:09:14 2011 +0100
@@ -810,7 +810,9 @@
 def match(spec):
     if not spec:
         raise error.ParseError(_("empty query"))
-    tree = parse(spec)
+    tree, pos = parse(spec)
+    if (pos != len(spec)):
+        raise error.ParseError("invalid token", pos)
     weight, tree = optimize(tree, True)
     def mfunc(repo, subset):
         return getset(repo, subset, tree)