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
--- a/mercurial/revset.py Mon Apr 02 09:06:24 2018 -0700
+++ b/mercurial/revset.py Mon Apr 02 09:16:52 2018 -0700
@@ -116,6 +116,8 @@
# 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)):
--- a/tests/test-revset2.t Mon Apr 02 09:06:24 2018 -0700
+++ b/tests/test-revset2.t Mon Apr 02 09:16:52 2018 -0700
@@ -581,7 +581,8 @@
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