diff mercurial/revset.py @ 37264:d2c912836465

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
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 02 Apr 2018 09:16:52 -0700
parents f0b6fbea00cf
children 0194dac77c93
line wrap: on
line diff
--- 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)):