[PATCH 3 of 4] revset: add hint for list error to use or
timeless
timeless at mozdev.org
Wed Dec 23 11:58:52 CST 2015
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1450893243 0
# Wed Dec 23 17:54:03 2015 +0000
# Node ID 2d9cedc98af1671355ad81b360eec771382597a0
# Parent b87c3846c54f22d270d71c42d8b80d21b51a927e
revset: add hint for list error to use or
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -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"))
diff --git a/tests/test-revset.t b/tests/test-revset.t
--- a/tests/test-revset.t
+++ b/tests/test-revset.t
@@ -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'
More information about the Mercurial-devel
mailing list