@@ -436,6 +436,9 @@
def andset(repo, subset, x, y):
return getset(repo, getset(repo, subset, x), y)
+def minusset(repo, subset, x, y):
+ return getset(repo, subset, x) - getset(repo, subset, y)
+
def orset(repo, subset, *xs):
assert xs
if len(xs) == 1:
@@ -2145,6 +2148,7 @@
"and": andset,
"or": orset,
"not": notset,
+ "minusset": minusset,
"list": listset,
"keyvalue": keyvaluepair,
"func": func,
@@ -2205,6 +2209,9 @@
if isonly(tb, ta):
return w, ('func', ('symbol', 'only'), ('list', tb[2], ta[1][2]))
+ if tb is not None and tb[0] == 'not':
+ return wa, ('minusset', ta, tb[1])
+
if wa > wb:
return w, (op, tb, ta)
return w, (op, ta, tb)