Patchwork D3018: revset: drop support for '' as alias for '.'

login
register
mail settings
Submitter phabricator
Date April 2, 2018, 6:48 p.m.
Message ID <8c1334fb7d026577625c0bb9dc18e711@localhost.localdomain>
Download mbox | patch
Permalink /patch/30140/
State Not Applicable
Headers show

Comments

phabricator - April 2, 2018, 6:48 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe387d8073f22: revset: drop support for &#039;&#039; as alias for &#039;.&#039; (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3018?vs=7509&id=7516

REVISION DETAIL
  https://phab.mercurial-scm.org/D3018

AFFECTED FILES
  mercurial/revset.py
  tests/test-revset2.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

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)):