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