##// END OF EJS Templates
Cleanup: unifiy the coding style in the ui.py configitems forwarders....
Markus F.X.J. Oberhumer -
r2388:74d56933 default
parent child Browse files
Show More
@@ -145,34 +145,30 b' class ui(object):'
145 return self.configitems("extensions")
145 return self.configitems("extensions")
146
146
147 def hgignorefiles(self):
147 def hgignorefiles(self):
148 result = []
148 ret = []
149 cfgitems = self.configitems("ui")
149 for k, v in self.configitems("ui"):
150 for key, value in cfgitems:
150 if k == 'ignore' or k.startswith('ignore.'):
151 if key == 'ignore' or key.startswith('ignore.'):
151 ret.append(os.path.expanduser(v))
152 path = os.path.expanduser(value)
152 return ret
153 result.append(path)
154 return result
155
153
156 def configrevlog(self):
154 def configrevlog(self):
157 ret = {}
155 ret = {}
158 for x in self.configitems("revlog"):
156 for k, v in self.configitems("revlog"):
159 k = x[0].lower()
157 ret[k.lower()] = v
160 ret[k] = x[1]
161 return ret
158 return ret
159
162 def diffopts(self):
160 def diffopts(self):
163 if self.diffcache:
161 if self.diffcache:
164 return self.diffcache
162 return self.diffcache
165 ret = { 'showfunc' : True, 'ignorews' : False}
163 ret = { 'showfunc' : True, 'ignorews' : False}
166 for x in self.configitems("diff"):
164 for k, v in self.configitems("diff"):
167 k = x[0].lower()
168 v = x[1]
169 if v:
165 if v:
170 v = v.lower()
166 v = v.lower()
171 if v == 'true':
167 if v == 'true':
172 value = True
168 v = True
173 else:
169 else:
174 value = False
170 v = False
175 ret[k] = value
171 ret[k.lower()] = v
176 self.diffcache = ret
172 self.diffcache = ret
177 return ret
173 return ret
178
174
General Comments 0
You need to be logged in to leave comments. Login now