equal
deleted
inserted
replaced
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 |