hgext/keyword.py
changeset 5825 2b67acc404f6
parent 5824 b8e8bd3c82f6
child 5831 4a40b7066525
equal deleted inserted replaced
5824:b8e8bd3c82f6 5825:2b67acc404f6
   326     ui.note(_('\n%s keywords written to %s:\n') % (kwstatus, path))
   326     ui.note(_('\n%s keywords written to %s:\n') % (kwstatus, path))
   327     ui.note(keywords)
   327     ui.note(keywords)
   328     ui.note('\nhg -R "%s" branch "%s"\n' % (tmpdir, branchname))
   328     ui.note('\nhg -R "%s" branch "%s"\n' % (tmpdir, branchname))
   329     # silence branch command if not verbose
   329     # silence branch command if not verbose
   330     quiet = ui.quiet
   330     quiet = ui.quiet
   331     verbose = ui.verbose
   331     ui.quiet = not ui.verbose
   332     ui.quiet = not verbose
       
   333     commands.branch(ui, repo, branchname)
   332     commands.branch(ui, repo, branchname)
   334     ui.quiet = quiet
   333     ui.quiet = quiet
   335     for name, cmd in ui.configitems('hooks'):
   334     for name, cmd in ui.configitems('hooks'):
   336         if name.split('.', 1)[0].find('commit') > -1:
   335         if name.split('.', 1)[0].find('commit') > -1:
   337             repo.ui.setconfig('hooks', name, '')
   336             repo.ui.setconfig('hooks', name, '')
   361     keyword expansion.
   360     keyword expansion.
   362     That is, files matched by [keyword] config patterns but not symlinks.
   361     That is, files matched by [keyword] config patterns but not symlinks.
   363     '''
   362     '''
   364     status = _status(ui, repo, *pats, **opts)
   363     status = _status(ui, repo, *pats, **opts)
   365     modified, added, removed, deleted, unknown, ignored, clean = status
   364     modified, added, removed, deleted, unknown, ignored, clean = status
       
   365     files = modified + added + clean
   366     if opts.get('untracked'):
   366     if opts.get('untracked'):
   367         files = modified + added + unknown + clean
   367         files += unknown
   368     else:
       
   369         files = modified + added + clean
       
   370     files.sort()
   368     files.sort()
   371     kwfiles = [f for f in files if _iskwfile(f, repo._link)]
   369     kwfiles = [f for f in files if _iskwfile(f, repo._link)]
   372     cwd = pats and repo.getcwd() or ''
   370     cwd = pats and repo.getcwd() or ''
   373     kwfstats = not opts.get('ignore') and (('K', kwfiles),) or ()
   371     kwfstats = not opts.get('ignore') and (('K', kwfiles),) or ()
   374     if opts.get('all') or opts.get('ignore'):
   372     if opts.get('all') or opts.get('ignore'):