Show More
@@ -249,10 +249,15 b' class kwtemplater(object):' | |||||
249 | kwcmd = self.restrict and lookup # kwexpand/kwshrink |
|
249 | kwcmd = self.restrict and lookup # kwexpand/kwshrink | |
250 | if self.restrict or expand and lookup: |
|
250 | if self.restrict or expand and lookup: | |
251 | mf = ctx.manifest() |
|
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 | lctx = ctx |
|
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 | for f in candidates: |
|
261 | for f in candidates: | |
257 | if self.restrict: |
|
262 | if self.restrict: | |
258 | data = self.repo.file(f).read(mf[f]) |
|
263 | data = self.repo.file(f).read(mf[f]) | |
@@ -293,7 +298,9 b' class kwtemplater(object):' | |||||
293 | def wread(self, fname, data): |
|
298 | def wread(self, fname, data): | |
294 | '''If in restricted mode returns data read from wdir with |
|
299 | '''If in restricted mode returns data read from wdir with | |
295 | keyword substitutions removed.''' |
|
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 | class kwfilelog(filelog.filelog): |
|
305 | class kwfilelog(filelog.filelog): | |
299 | ''' |
|
306 | ''' | |
@@ -412,7 +419,10 b' def demo(ui, repo, *args, **opts):' | |||||
412 | ui.setconfig('keywordmaps', k, v) |
|
419 | ui.setconfig('keywordmaps', k, v) | |
413 | else: |
|
420 | else: | |
414 | ui.status(_('\n\tconfiguration using current keyword template maps\n')) |
|
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 | uisetup(ui) |
|
427 | uisetup(ui) | |
418 | reposetup(ui, repo) |
|
428 | reposetup(ui, repo) |
General Comments 0
You need to be logged in to leave comments.
Login now