src/mercurialserver/ruleset.py
changeset 297 9875791ab421
parent 242 03d8f07230b3
child 300 31c2c6b383fd
     1.1 --- a/src/mercurialserver/ruleset.py	Sat Dec 19 10:47:13 2009 +0000
     1.2 +++ b/src/mercurialserver/ruleset.py	Mon Apr 18 10:52:45 2011 +0100
     1.3 @@ -19,15 +19,16 @@
     1.4  def rule(pairs):
     1.5      matchers = [(k, globmatcher(v)) for k, v in pairs]
     1.6      def c(kw):
     1.7 +        best = True
     1.8          for k, m in matchers:
     1.9              if k not in kw:
    1.10                  return False
    1.11              kkw = kw[k]
    1.12              if kkw is None:
    1.13 -                return None
    1.14 -            if m.match(kkw) is None:
    1.15 +                best = None
    1.16 +            elif m.match(kkw) is None:
    1.17                  return False
    1.18 -        return True
    1.19 +        return best
    1.20      return c
    1.21  
    1.22  class Ruleset(object):