mercurial/minifileset.py
changeset 38804 d82c4d42b615
parent 38687 1500cbe22d53
child 38805 b9162ea1b815
--- a/mercurial/minifileset.py	Sat Jul 21 15:14:38 2018 +0900
+++ b/mercurial/minifileset.py	Sat Jul 21 15:23:56 2018 +0900
@@ -40,9 +40,8 @@
         raise error.ParseError(_("unsupported file pattern: %s") % name,
                                hint=_('paths must be prefixed with "path:"'))
     elif op == 'or':
-        func1 = _compile(tree[1])
-        func2 = _compile(tree[2])
-        return lambda n, s: func1(n, s) or func2(n, s)
+        funcs = [_compile(x) for x in tree[1:]]
+        return lambda n, s: any(f(n, s) for f in funcs)
     elif op == 'and':
         func1 = _compile(tree[1])
         func2 = _compile(tree[2])