hgkw/keyword.py
branch0.9.2compat
changeset 329 27f2e2126447
parent 322 b1ac738404f8
child 332 f56004dedc1e
equal deleted inserted replaced
326:225c969e007b 329:27f2e2126447
   424     ui.note(_('\n%s keywords written to %s:\n') % (kwstatus, path))
   424     ui.note(_('\n%s keywords written to %s:\n') % (kwstatus, path))
   425     ui.note(keywords)
   425     ui.note(keywords)
   426     ui.note('\nhg -R "%s" branch "%s"\n' % (tmpdir, branchname))
   426     ui.note('\nhg -R "%s" branch "%s"\n' % (tmpdir, branchname))
   427     # silence branch command if not verbose
   427     # silence branch command if not verbose
   428     quiet = ui.quiet
   428     quiet = ui.quiet
   429     verbose = ui.verbose
   429     ui.quiet = not ui.verbose
   430     ui.quiet = not verbose
       
   431     commands.branch(ui, repo, branchname)
   430     commands.branch(ui, repo, branchname)
   432     ui.quiet = quiet
   431     ui.quiet = quiet
   433     for name, cmd in ui.configitems('hooks'):
   432     for name, cmd in ui.configitems('hooks'):
   434         if name.split('.', 1)[0].find('commit') > -1:
   433         if name.split('.', 1)[0].find('commit') > -1:
   435             repo.ui.setconfig('hooks', name, '')
   434             repo.ui.setconfig('hooks', name, '')
   459     keyword expansion.
   458     keyword expansion.
   460     That is, files matched by [keyword] config patterns but not symlinks.
   459     That is, files matched by [keyword] config patterns but not symlinks.
   461     '''
   460     '''
   462     status = _status(ui, repo, *pats, **opts)
   461     status = _status(ui, repo, *pats, **opts)
   463     modified, added, removed, deleted, unknown, ignored, clean = status
   462     modified, added, removed, deleted, unknown, ignored, clean = status
       
   463     files = modified + added + clean
   464     if opts.get('untracked'):
   464     if opts.get('untracked'):
   465         files = modified + added + unknown + clean
   465         files += unknown
   466     else:
       
   467         files = modified + added + clean
       
   468     files.sort()
   466     files.sort()
   469     # use the full definition of repo._link for backwards compatibility
   467     # use the full definition of repo._link for backwards compatibility
   470     kwfiles = [f for f in files if _kwtemplater.matcher(f)
   468     kwfiles = [f for f in files if _kwtemplater.matcher(f)
   471                and not os.path.islink(repo.wjoin(f))]
   469                and not os.path.islink(repo.wjoin(f))]
   472     cwd = pats and repo.getcwd() or ''
   470     cwd = pats and repo.getcwd() or ''