Show More
@@ -194,7 +194,7 b' class kwtemplater(object):' | |||||
194 | expansion are not symbolic links.''' |
|
194 | expansion are not symbolic links.''' | |
195 | return [f for f in cand if self.match(f) and not 'l' in ctx.flags(f)] |
|
195 | return [f for f in cand if self.match(f) and not 'l' in ctx.flags(f)] | |
196 |
|
196 | |||
197 |
def overwrite(self, ctx, candidates, lookup, expand, re |
|
197 | def overwrite(self, ctx, candidates, lookup, expand, rekw=False): | |
198 | '''Overwrites selected files expanding/shrinking keywords.''' |
|
198 | '''Overwrites selected files expanding/shrinking keywords.''' | |
199 | if self.restrict or lookup: # exclude kw_copy |
|
199 | if self.restrict or lookup: # exclude kw_copy | |
200 | candidates = self.iskwfile(candidates, ctx) |
|
200 | candidates = self.iskwfile(candidates, ctx) | |
@@ -204,8 +204,7 b' class kwtemplater(object):' | |||||
204 | if self.restrict or expand and lookup: |
|
204 | if self.restrict or expand and lookup: | |
205 | mf = ctx.manifest() |
|
205 | mf = ctx.manifest() | |
206 | fctx = ctx |
|
206 | fctx = ctx | |
207 | subn = (self.restrict and self.re_kw.subn or |
|
207 | subn = (self.restrict or rekw) and self.re_kw.subn or self.re_kwexp.subn | |
208 | recsubn or self.re_kwexp.subn) |
|
|||
209 | msg = (expand and _('overwriting %s expanding keywords\n') |
|
208 | msg = (expand and _('overwriting %s expanding keywords\n') | |
210 | or _('overwriting %s shrinking keywords\n')) |
|
209 | or _('overwriting %s shrinking keywords\n')) | |
211 | for f in candidates: |
|
210 | for f in candidates: | |
@@ -578,8 +577,8 b' def reposetup(ui, repo):' | |||||
578 | modified = [f for f in modified if f in changed] |
|
577 | modified = [f for f in modified if f in changed] | |
579 | added = [f for f in added if f in changed] |
|
578 | added = [f for f in added if f in changed] | |
580 | kwt.restrict = False |
|
579 | kwt.restrict = False | |
581 |
kwt.overwrite(recctx, modified, False, True |
|
580 | kwt.overwrite(recctx, modified, False, True) | |
582 |
kwt.overwrite(recctx, added, False, True, |
|
581 | kwt.overwrite(recctx, added, False, True, True) | |
583 | kwt.restrict = True |
|
582 | kwt.restrict = True | |
584 | return ret |
|
583 | return ret | |
585 | finally: |
|
584 | finally: |
General Comments 0
You need to be logged in to leave comments.
Login now