Show More
@@ -136,6 +136,9 b' def minusset(mctx, x, y):' | |||
|
136 | 136 | yl = set(getset(mctx, y)) |
|
137 | 137 | return [f for f in xl if f not in yl] |
|
138 | 138 | |
|
139 | def negateset(mctx, x): | |
|
140 | raise error.ParseError(_("can't use negate operator in this context")) | |
|
141 | ||
|
139 | 142 | def listset(mctx, a, b): |
|
140 | 143 | raise error.ParseError(_("can't use a list in this context"), |
|
141 | 144 | hint=_('see hg help "filesets.x or y"')) |
@@ -523,6 +526,7 b' methods = {' | |||
|
523 | 526 | 'and': andset, |
|
524 | 527 | 'or': orset, |
|
525 | 528 | 'minus': minusset, |
|
529 | 'negate': negateset, | |
|
526 | 530 | 'list': listset, |
|
527 | 531 | 'group': getset, |
|
528 | 532 | 'not': notset, |
@@ -68,6 +68,17 b' Test invalid syntax' | |||
|
68 | 68 | None) |
|
69 | 69 | hg: parse error: not a symbol |
|
70 | 70 | [255] |
|
71 | $ fileset -v -- '-x' | |
|
72 | (negate | |
|
73 | (symbol 'x')) | |
|
74 | hg: parse error: can't use negate operator in this context | |
|
75 | [255] | |
|
76 | $ fileset -v -- '-()' | |
|
77 | (negate | |
|
78 | (group | |
|
79 | None)) | |
|
80 | hg: parse error: can't use negate operator in this context | |
|
81 | [255] | |
|
71 | 82 | |
|
72 | 83 | Test files status |
|
73 | 84 |
General Comments 0
You need to be logged in to leave comments.
Login now