diff --git a/mercurial/fileset.py b/mercurial/fileset.py
--- a/mercurial/fileset.py
+++ b/mercurial/fileset.py
@@ -107,6 +107,11 @@ def notset(mctx, x):
     s = set(getset(mctx, x))
     return [r for r in mctx.subset if r not in s]
 
+def minusset(mctx, x, y):
+    xl = getset(mctx, x)
+    yl = set(getset(mctx, y))
+    return [f for f in xl if f not in yl]
+
 def listset(mctx, a, b):
     raise error.ParseError(_("can't use a list in this context"))
 
@@ -406,6 +411,7 @@ methods = {
     'symbol': stringset,
     'and': andset,
     'or': orset,
+    'minus': minusset,
     'list': listset,
     'group': getset,
     'not': notset,
diff --git a/tests/test-fileset.t b/tests/test-fileset.t
--- a/tests/test-fileset.t
+++ b/tests/test-fileset.t
@@ -36,4 +36,6 @@ Test operators and basic patterns
   b1
   $ fileset '! ("a*")'
   b1
+  $ fileset 'a* - a1'
+  a2