src/mercurialserver/ruleset.py
changeset 78 2a3407a14654
parent 77 8d14aac93b5d
child 106 0519745e7a57
equal deleted inserted replaced
77:8d14aac93b5d 78:2a3407a14654
    59         self.rules.append((action, conditions))
    59         self.rules.append((action, conditions))
    60 
    60 
    61     def set(self, **kw):
    61     def set(self, **kw):
    62         self.preset.update(kw)
    62         self.preset.update(kw)
    63         
    63         
       
    64     def get(self, k):
       
    65         return self.preset.get(k, None)
       
    66         
    64     def matchrule(self, kw):
    67     def matchrule(self, kw):
    65         d = self.preset.copy()
    68         d = self.preset.copy()
    66         d.update(kw)
    69         d.update(kw)
    67         for a, c in self.rules:
    70         for a, c in self.rules:
    68             if c(d):
    71             if c(d):