Show More
@@ -249,10 +249,15 b' class kwtemplater(object):' | |||
|
249 | 249 | kwcmd = self.restrict and lookup # kwexpand/kwshrink |
|
250 | 250 | if self.restrict or expand and lookup: |
|
251 | 251 | mf = ctx.manifest() |
|
252 | if self.restrict or rekw: | |
|
253 | re_kw = self.rekw | |
|
254 | else: | |
|
255 | re_kw = self.rekwexp | |
|
256 | if expand: | |
|
257 | msg = _('overwriting %s expanding keywords\n') | |
|
258 | else: | |
|
259 | msg = _('overwriting %s shrinking keywords\n') | |
|
252 | 260 | lctx = ctx |
|
253 | re_kw = (self.restrict or rekw) and self.rekw or self.rekwexp | |
|
254 | msg = (expand and _('overwriting %s expanding keywords\n') | |
|
255 | or _('overwriting %s shrinking keywords\n')) | |
|
256 | 261 | for f in candidates: |
|
257 | 262 | if self.restrict: |
|
258 | 263 | data = self.repo.file(f).read(mf[f]) |
@@ -293,7 +298,9 b' class kwtemplater(object):' | |||
|
293 | 298 | def wread(self, fname, data): |
|
294 | 299 | '''If in restricted mode returns data read from wdir with |
|
295 | 300 | keyword substitutions removed.''' |
|
296 | return self.restrict and self.shrink(fname, data) or data | |
|
301 | if self.restrict: | |
|
302 | return self.shrink(fname, data) | |
|
303 | return data | |
|
297 | 304 | |
|
298 | 305 | class kwfilelog(filelog.filelog): |
|
299 | 306 | ''' |
@@ -412,7 +419,10 b' def demo(ui, repo, *args, **opts):' | |||
|
412 | 419 | ui.setconfig('keywordmaps', k, v) |
|
413 | 420 | else: |
|
414 | 421 | ui.status(_('\n\tconfiguration using current keyword template maps\n')) |
|
415 | kwmaps = dict(uikwmaps) or _defaultkwmaps(ui) | |
|
422 | if uikwmaps: | |
|
423 | kwmaps = dict(uikwmaps) | |
|
424 | else: | |
|
425 | kwmaps = _defaultkwmaps(ui) | |
|
416 | 426 | |
|
417 | 427 | uisetup(ui) |
|
418 | 428 | reposetup(ui, repo) |
General Comments 0
You need to be logged in to leave comments.
Login now