# HG changeset patch # User Markus F.X.J. Oberhumer # Date 1149202471 25200 # Node ID 74d569332f8b46895e34a37a1182648bd403e795 # Parent b429566d1994787266f34886dbe1c20b116dc9a3 Cleanup: unifiy the coding style in the ui.py configitems forwarders. No functional changes. diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -145,34 +145,30 @@ class ui(object): return self.configitems("extensions") def hgignorefiles(self): - result = [] - cfgitems = self.configitems("ui") - for key, value in cfgitems: - if key == 'ignore' or key.startswith('ignore.'): - path = os.path.expanduser(value) - result.append(path) - return result + ret = [] + for k, v in self.configitems("ui"): + if k == 'ignore' or k.startswith('ignore.'): + ret.append(os.path.expanduser(v)) + return ret def configrevlog(self): ret = {} - for x in self.configitems("revlog"): - k = x[0].lower() - ret[k] = x[1] + for k, v in self.configitems("revlog"): + ret[k.lower()] = v return ret + def diffopts(self): if self.diffcache: return self.diffcache ret = { 'showfunc' : True, 'ignorews' : False} - for x in self.configitems("diff"): - k = x[0].lower() - v = x[1] + for k, v in self.configitems("diff"): if v: v = v.lower() if v == 'true': - value = True + v = True else: - value = False - ret[k] = value + v = False + ret[k.lower()] = v self.diffcache = ret return ret