mercurial/revset.py
branchstable
changeset 14496 ffcb7e4d719f
parent 14356 02a5bebd0dc4
child 14509 4f695345979c
equal deleted inserted replaced
14479:c63cc5eccbff 14496:ffcb7e4d719f
   808 parse = parser.parser(tokenize, elements).parse
   808 parse = parser.parser(tokenize, elements).parse
   809 
   809 
   810 def match(spec):
   810 def match(spec):
   811     if not spec:
   811     if not spec:
   812         raise error.ParseError(_("empty query"))
   812         raise error.ParseError(_("empty query"))
   813     tree = parse(spec)
   813     tree, pos = parse(spec)
       
   814     if (pos != len(spec)):
       
   815         raise error.ParseError("invalid token", pos)
   814     weight, tree = optimize(tree, True)
   816     weight, tree = optimize(tree, True)
   815     def mfunc(repo, subset):
   817     def mfunc(repo, subset):
   816         return getset(repo, subset, tree)
   818         return getset(repo, subset, tree)
   817     return mfunc
   819     return mfunc
   818 
   820