changeset 2388:74d569332f8b

Cleanup: unifiy the coding style in the ui.py configitems forwarders. No functional changes.
author Markus F.X.J. Oberhumer <markus@oberhumer.com>
date Thu, 01 Jun 2006 15:54:31 -0700
parents b429566d1994
children 609c56df709a
files mercurial/ui.py
diffstat 1 files changed, 12 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- 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