mercurial/filesetlang.py
changeset 38828 3ea6ce609747
parent 38827 48fc2a8af345
child 38829 7e7e2b2ff284
--- a/mercurial/filesetlang.py	Sat Jul 21 16:13:30 2018 +0900
+++ b/mercurial/filesetlang.py	Sat Jul 21 16:16:44 2018 +0900
@@ -144,7 +144,9 @@
         return (op, x[1], t)
     if op == 'group':
         return _analyze(x[1])
-    if op in {'not', 'negate'}:
+    if op == 'negate':
+        raise error.ParseError(_("can't use negate operator in this context"))
+    if op == 'not':
         t = _analyze(x[1])
         return (op, t)
     if op in {'and', 'minus'}: