Show More
@@ -103,7 +103,7 b' def parse(expr):' | |||
|
103 | 103 | tree, pos = p.parse(tokenize(expr)) |
|
104 | 104 | if pos != len(expr): |
|
105 | 105 | raise error.ParseError(_("invalid token"), pos) |
|
106 | return tree | |
|
106 | return parser.simplifyinfixops(tree, {'list'}) | |
|
107 | 107 | |
|
108 | 108 | def getsymbol(x): |
|
109 | 109 | if x and x[0] == 'symbol': |
@@ -131,7 +131,7 b' def getlist(x):' | |||
|
131 | 131 | if not x: |
|
132 | 132 | return [] |
|
133 | 133 | if x[0] == 'list': |
|
134 |
return |
|
|
134 | return list(x[1:]) | |
|
135 | 135 | return [x] |
|
136 | 136 | |
|
137 | 137 | def getargs(x, min, max, err): |
@@ -174,7 +174,7 b' def minusmatch(mctx, x, y):' | |||
|
174 | 174 | def negatematch(mctx, x): |
|
175 | 175 | raise error.ParseError(_("can't use negate operator in this context")) |
|
176 | 176 | |
|
177 |
def listmatch(mctx, |
|
|
177 | def listmatch(mctx, *xs): | |
|
178 | 178 | raise error.ParseError(_("can't use a list in this context"), |
|
179 | 179 | hint=_('see hg help "filesets.x or y"')) |
|
180 | 180 |
@@ -111,6 +111,15 b' Test invalid syntax' | |||
|
111 | 111 | None)) |
|
112 | 112 | hg: parse error: can't use negate operator in this context |
|
113 | 113 | [255] |
|
114 | $ fileset -p parsed 'a, b, c' | |
|
115 | * parsed: | |
|
116 | (list | |
|
117 | (symbol 'a') | |
|
118 | (symbol 'b') | |
|
119 | (symbol 'c')) | |
|
120 | hg: parse error: can't use a list in this context | |
|
121 | (see hg help "filesets.x or y") | |
|
122 | [255] | |
|
114 | 123 | |
|
115 | 124 | $ fileset '"path":.' |
|
116 | 125 | hg: parse error: not a symbol |
General Comments 0
You need to be logged in to leave comments.
Login now