D3018: revset: drop support for '' as alias for '.'
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Mon Apr 2 17:15:49 UTC 2018
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3018
AFFECTED FILES
mercurial/revset.py
tests/test-revset2.t
CHANGE DETAILS
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 @@
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
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -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)):
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list