Show More
@@ -191,16 +191,15 b' class kwtemplater(object):' | |||||
191 | return self.substitute(data, path, ctx, self.re_kw.sub) |
|
191 | return self.substitute(data, path, ctx, self.re_kw.sub) | |
192 | return data |
|
192 | return data | |
193 |
|
193 | |||
194 |
def iskwfile(self, |
|
194 | def iskwfile(self, cand, ctx): | |
195 | '''Returns true if path matches [keyword] pattern |
|
195 | '''Returns subset of candidates which are configured for keyword | |
196 |
|
|
196 | expansion are not symbolic links.''' | |
197 | Caveat: localrepository._link fails on Windows.''' |
|
197 | return [f for f in cand if self.match(f) and not 'l' in ctx.flags(f)] | |
198 | return self.match(path) and not 'l' in flagfunc(path) |
|
|||
199 |
|
198 | |||
200 | def overwrite(self, ctx, candidates, lookup, expand): |
|
199 | def overwrite(self, ctx, candidates, lookup, expand): | |
201 | '''Overwrites selected files expanding/shrinking keywords.''' |
|
200 | '''Overwrites selected files expanding/shrinking keywords.''' | |
202 | if self.restrict or lookup: # exclude kw_copy |
|
201 | if self.restrict or lookup: # exclude kw_copy | |
203 |
candidates = |
|
202 | candidates = self.iskwfile(candidates, ctx) | |
204 | if not candidates: |
|
203 | if not candidates: | |
205 | return |
|
204 | return | |
206 | commit = self.restrict and not lookup |
|
205 | commit = self.restrict and not lookup | |
@@ -417,8 +416,8 b' def files(ui, repo, *pats, **opts):' | |||||
417 | if not opts.get('unknown') or opts.get('all'): |
|
416 | if not opts.get('unknown') or opts.get('all'): | |
418 | files = sorted(modified + added + clean) |
|
417 | files = sorted(modified + added + clean) | |
419 | wctx = repo[None] |
|
418 | wctx = repo[None] | |
420 |
kwfiles = |
|
419 | kwfiles = kwt.iskwfile(files, wctx) | |
421 |
kwunknown = |
|
420 | kwunknown = kwt.iskwfile(unknown, wctx) | |
422 | if not opts.get('ignore') or opts.get('all'): |
|
421 | if not opts.get('ignore') or opts.get('all'): | |
423 | showfiles = kwfiles, kwunknown |
|
422 | showfiles = kwfiles, kwunknown | |
424 | else: |
|
423 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now