Cleanup: unifiy the coding style in the ui.py configitems forwarders.
authorMarkus F.X.J. Oberhumer <markus@oberhumer.com>
Thu, 01 Jun 2006 15:54:31 -0700
changeset 2388 74d569332f8b
parent 2382 b429566d1994
child 2389 609c56df709a
Cleanup: unifiy the coding style in the ui.py configitems forwarders. No functional changes.
mercurial/ui.py
--- a/mercurial/ui.py	Fri Jun 02 00:33:42 2006 +0200
+++ b/mercurial/ui.py	Thu Jun 01 15:54:31 2006 -0700
@@ -145,34 +145,30 @@
         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