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