comparison mercurial/ui.py @ 10244:c4c0502be198

merge with stable
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 13 Jan 2010 12:00:06 +0100
parents 489b0caf21ed cd3e5c47d663
children d6512b3e9ac0
comparison
equal deleted inserted replaced
10241:4b2a086bee31 10244:c4c0502be198
132 132
133 def configbool(self, section, name, default=False, untrusted=False): 133 def configbool(self, section, name, default=False, untrusted=False):
134 v = self.config(section, name, None, untrusted) 134 v = self.config(section, name, None, untrusted)
135 if v is None: 135 if v is None:
136 return default 136 return default
137 if isinstance(v, bool):
138 return v
137 if v.lower() not in _booleans: 139 if v.lower() not in _booleans:
138 raise error.ConfigError(_("%s.%s not a boolean ('%s')") 140 raise error.ConfigError(_("%s.%s not a boolean ('%s')")
139 % (section, name, v)) 141 % (section, name, v))
140 return _booleans[v.lower()] 142 return _booleans[v.lower()]
141 143