hgext/keyword.py
changeset 6762 f67d1468ac50
parent 6760 4faaa0535ea7
child 6867 e64f5abb8a88
equal deleted inserted replaced
6761:cb981fc955fb 6762:f67d1468ac50
   181             mf = ctx.manifest()
   181             mf = ctx.manifest()
   182             notify = self.ui.note
   182             notify = self.ui.note
   183         candidates = [f for f in files if self.iskwfile(f, ctx.flags)]
   183         candidates = [f for f in files if self.iskwfile(f, ctx.flags)]
   184         if candidates:
   184         if candidates:
   185             self.restrict = True # do not expand when reading
   185             self.restrict = True # do not expand when reading
   186             candidates.sort()
       
   187             action = expand and 'expanding' or 'shrinking'
   186             action = expand and 'expanding' or 'shrinking'
   188             for f in candidates:
   187             for f in candidates:
   189                 fp = self.repo.file(f)
   188                 fp = self.repo.file(f)
   190                 data = fp.read(mf[f])
   189                 data = fp.read(mf[f])
   191                 if util.binary(data):
   190                 if util.binary(data):
   380     That is, files matched by [keyword] config patterns but not symlinks.
   379     That is, files matched by [keyword] config patterns but not symlinks.
   381     '''
   380     '''
   382     kwt = kwtools['templater']
   381     kwt = kwtools['templater']
   383     status = _status(ui, repo, kwt, opts.get('untracked'), *pats, **opts)
   382     status = _status(ui, repo, kwt, opts.get('untracked'), *pats, **opts)
   384     modified, added, removed, deleted, unknown, ignored, clean = status
   383     modified, added, removed, deleted, unknown, ignored, clean = status
   385     files = modified + added + clean + unknown
   384     files = util.sort(modified + added + clean + unknown)
   386     files.sort()
       
   387     wctx = repo[None]
   385     wctx = repo[None]
   388     kwfiles = [f for f in files if kwt.iskwfile(f, wctx.flags)]
   386     kwfiles = [f for f in files if kwt.iskwfile(f, wctx.flags)]
   389     cwd = pats and repo.getcwd() or ''
   387     cwd = pats and repo.getcwd() or ''
   390     kwfstats = not opts.get('ignore') and (('K', kwfiles),) or ()
   388     kwfstats = not opts.get('ignore') and (('K', kwfiles),) or ()
   391     if opts.get('all') or opts.get('ignore'):
   389     if opts.get('all') or opts.get('ignore'):