src/mercurialserver/ruleset.py
changeset 297 9875791ab421
parent 242 03d8f07230b3
child 300 31c2c6b383fd
--- a/src/mercurialserver/ruleset.py	Thu Apr 14 18:21:23 2011 +0100
+++ b/src/mercurialserver/ruleset.py	Mon Apr 18 10:52:45 2011 +0100
@@ -19,15 +19,16 @@
 def rule(pairs):
     matchers = [(k, globmatcher(v)) for k, v in pairs]
     def c(kw):
+        best = True
         for k, m in matchers:
             if k not in kw:
                 return False
             kkw = kw[k]
             if kkw is None:
-                return None
-            if m.match(kkw) is None:
+                best = None
+            elif m.match(kkw) is None:
                 return False
-        return True
+        return best
     return c
 
 class Ruleset(object):