revset: add hint for list error to use or
authortimeless <timeless@mozdev.org>
Wed, 23 Dec 2015 17:54:03 +0000
changeset 27517 c60a9c16ae25
parent 27516 1c1216182dc1
child 27518 737ffdabbde9
revset: add hint for list error to use or
mercurial/revset.py
tests/test-revset.t
--- 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'