# HG changeset patch # User Matt Mackall # Date 2010-06-18 22:34:13 # Node ID e5a2134c083b223bd2998b6694e430e4999caee3 # Parent c040847539905c3f9c8b417586128695c72f3dd4 revset: nicer exception for empty queries diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -546,6 +546,8 @@ def optimize(x, small): parse = parser.parser(tokenize, elements).parse def match(spec): + if not spec: + raise error.ParseError(_("empty query")) tree = parse(spec) weight, tree = optimize(tree, True) def mfunc(repo, subset):