##// END OF EJS Templates
Further cleanup of ui.py (changeset 74d569332f8b used one-char variable names).
Thomas Arendsen Hein -
r2403:9b074720 default
parent child Browse files
Show More
@@ -142,38 +142,34 b' class ui(object):'
142 142 yield parent
143 143
144 144 def extensions(self):
145 ret = self.configitems("extensions")
146 for i, (k, v) in enumerate(ret):
147 if v: ret[i] = (k, os.path.expanduser(v))
148 return ret
145 result = self.configitems("extensions")
146 for i, (key, value) in enumerate(result):
147 if value:
148 result[i] = (key, os.path.expanduser(value))
149 return result
149 150
150 151 def hgignorefiles(self):
151 ret = []
152 for k, v in self.configitems("ui"):
153 if k == 'ignore' or k.startswith('ignore.'):
154 ret.append(os.path.expanduser(v))
155 return ret
152 result = []
153 for key, value in self.configitems("ui"):
154 if key == 'ignore' or key.startswith('ignore.'):
155 result.append(os.path.expanduser(value))
156 return result
156 157
157 158 def configrevlog(self):
158 ret = {}
159 for k, v in self.configitems("revlog"):
160 ret[k.lower()] = v
161 return ret
159 result = {}
160 for key, value in self.configitems("revlog"):
161 result[key.lower()] = value
162 return result
162 163
163 164 def diffopts(self):
164 165 if self.diffcache:
165 166 return self.diffcache
166 ret = { 'showfunc' : True, 'ignorews' : False}
167 for k, v in self.configitems("diff"):
168 if v:
169 v = v.lower()
170 if v == 'true':
171 v = True
172 else:
173 v = False
174 ret[k.lower()] = v
175 self.diffcache = ret
176 return ret
167 result = {'showfunc': True, 'ignorews': False}
168 for key, value in self.configitems("diff"):
169 if value:
170 result[key.lower()] = (value.lower() == 'true')
171 self.diffcache = result
172 return result
177 173
178 174 def username(self):
179 175 """Return default username to be used in commits.
General Comments 0
You need to be logged in to leave comments. Login now