##// END OF EJS Templates
fileset: actually implement 'minusset'...
Patrick Mezard -
r17363:5d9e2031 stable
parent child Browse files
Show More
@@ -107,6 +107,11 b' def notset(mctx, x):'
107 s = set(getset(mctx, x))
107 s = set(getset(mctx, x))
108 return [r for r in mctx.subset if r not in s]
108 return [r for r in mctx.subset if r not in s]
109
109
110 def minusset(mctx, x, y):
111 xl = getset(mctx, x)
112 yl = set(getset(mctx, y))
113 return [f for f in xl if f not in yl]
114
110 def listset(mctx, a, b):
115 def listset(mctx, a, b):
111 raise error.ParseError(_("can't use a list in this context"))
116 raise error.ParseError(_("can't use a list in this context"))
112
117
@@ -406,6 +411,7 b' methods = {'
406 'symbol': stringset,
411 'symbol': stringset,
407 'and': andset,
412 'and': andset,
408 'or': orset,
413 'or': orset,
414 'minus': minusset,
409 'list': listset,
415 'list': listset,
410 'group': getset,
416 'group': getset,
411 'not': notset,
417 'not': notset,
@@ -36,4 +36,6 b' Test operators and basic patterns'
36 b1
36 b1
37 $ fileset '! ("a*")'
37 $ fileset '! ("a*")'
38 b1
38 b1
39 $ fileset 'a* - a1'
40 a2
39
41
General Comments 0
You need to be logged in to leave comments. Login now