[PATCH] revset: get rid of redundant error checking from match()

Yuya Nishihara yuya at tcha.org
Sun Jun 26 08:37:05 UTC 2016


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1466929017 -32400
#      Sun Jun 26 17:16:57 2016 +0900
# Node ID 540243aaab2dcc4e1e78de0936454462945c27e7
# Parent  25737d5695e2da9631e37ae304beabeb010ccf8f
revset: get rid of redundant error checking from match()

Actually there was no additional error checking. It should be caught by
"not all(specs)".

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2529,8 +2529,6 @@ def posttreebuilthook(tree, repo):
 
 def match(ui, spec, repo=None):
     """Create a matcher for a single revision spec."""
-    if not spec:
-        raise error.ParseError(_("empty query"))
     return matchany(ui, [spec], repo=repo)
 
 def matchany(ui, specs, repo=None):


More information about the Mercurial-devel mailing list