changeset 27517:c60a9c16ae25

revset: add hint for list error to use or
author timeless <timeless@mozdev.org>
date Wed, 23 Dec 2015 17:54:03 +0000
parents 1c1216182dc1
children 737ffdabbde9
files mercurial/revset.py tests/test-revset.t
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Wed Dec 23 17:39:32 2015 +0000
+++ b/mercurial/revset.py	Wed Dec 23 17:54:03 2015 +0000
@@ -448,7 +448,8 @@
     return subset - getset(repo, subset, x)
 
 def listset(repo, subset, a, b):
-    raise error.ParseError(_("can't use a list in this context"))
+    raise error.ParseError(_("can't use a list in this context"),
+                           hint=_('see hg help "revsets.x or y"'))
 
 def keyvaluepair(repo, subset, k, v):
     raise error.ParseError(_("can't use a key-value pair in this context"))
--- a/tests/test-revset.t	Wed Dec 23 17:39:32 2015 +0000
+++ b/tests/test-revset.t	Wed Dec 23 17:54:03 2015 +0000
@@ -1163,6 +1163,12 @@
   0
   -1
 
+test ',' in `_list`
+  $ log '0,1'
+  hg: parse error: can't use a list in this context
+  (see hg help "revsets.x or y")
+  [255]
+
 test that chained `or` operations make balanced addsets
 
   $ try '0:1|1:2|2:3|3:4|4:5'