hgkw/keyword.py
branchstable
changeset 475 3989df387ff7
parent 474 644b640cb3d0
child 476 0c36b6c991f9
equal deleted inserted replaced
474:644b640cb3d0 475:3989df387ff7
   183             mf = ctx.manifest()
   183             mf = ctx.manifest()
   184             notify = self.ui.note
   184             notify = self.ui.note
   185         candidates = [f for f in files if self.iskwfile(f, ctx.flags)]
   185         candidates = [f for f in files if self.iskwfile(f, ctx.flags)]
   186         if candidates:
   186         if candidates:
   187             self.restrict = True # do not expand when reading
   187             self.restrict = True # do not expand when reading
   188             candidates.sort()
       
   189             action = expand and 'expanding' or 'shrinking'
   188             action = expand and 'expanding' or 'shrinking'
   190             for f in candidates:
   189             for f in candidates:
   191                 fp = self.repo.file(f)
   190                 fp = self.repo.file(f)
   192                 data = fp.read(mf[f])
   191                 data = fp.read(mf[f])
   193                 if util.binary(data):
   192                 if util.binary(data):
   382     That is, files matched by [keyword] config patterns but not symlinks.
   381     That is, files matched by [keyword] config patterns but not symlinks.
   383     '''
   382     '''
   384     kwt = kwtools['templater']
   383     kwt = kwtools['templater']
   385     status = _status(ui, repo, kwt, opts.get('untracked'), *pats, **opts)
   384     status = _status(ui, repo, kwt, opts.get('untracked'), *pats, **opts)
   386     modified, added, removed, deleted, unknown, ignored, clean = status
   385     modified, added, removed, deleted, unknown, ignored, clean = status
   387     files = modified + added + clean + unknown
   386     files = util.sort(modified + added + clean + unknown)
   388     files.sort()
       
   389     wctx = repo[None]
   387     wctx = repo[None]
   390     kwfiles = [f for f in files if kwt.iskwfile(f, wctx.flags)]
   388     kwfiles = [f for f in files if kwt.iskwfile(f, wctx.flags)]
   391     cwd = pats and repo.getcwd() or ''
   389     cwd = pats and repo.getcwd() or ''
   392     kwfstats = not opts.get('ignore') and (('K', kwfiles),) or ()
   390     kwfstats = not opts.get('ignore') and (('K', kwfiles),) or ()
   393     if opts.get('all') or opts.get('ignore'):
   391     if opts.get('all') or opts.get('ignore'):