# HG changeset patch # User Martin von Zweigbergk # Date 2018-04-02 16:16:52 # Node ID d2c9128364654d91d5b655c2a34d22b63d0cde86 # Parent f74fdab86f1603beaf0338a545ad61a4176a9d33 revset: drop support for '' as alias for '.' Not marked BC because I think support for using '' on the CLI was there by accident, and we don't seem to have documented it. Differential Revision: https://phab.mercurial-scm.org/D3018 diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -116,6 +116,8 @@ def _sortedb(xs): # operator methods def stringset(repo, subset, x, order): + if not x: + raise error.ParseError(_("empty string is not a valid revision")) x = scmutil.intrev(repo[x]) if (x in subset or x == node.nullrev and isinstance(subset, fullreposet)): diff --git a/tests/test-revset2.t b/tests/test-revset2.t --- a/tests/test-revset2.t +++ b/tests/test-revset2.t @@ -581,7 +581,8 @@ test empty string hg: parse error: empty query [255] $ log 'parents("")' - 8 + hg: parse error: empty string is not a valid revision + [255] we can use patterns when searching for tags