hgkw/keyword.py
branchkwmap-templates
changeset 180 5d20f5d642f3
parent 179 8ddd39a79dc7
child 181 8019554adbb2
equal deleted inserted replaced
179:8ddd39a79dc7 180:5d20f5d642f3
   113     if ui.configitems('keywordmaps'):
   113     if ui.configitems('keywordmaps'):
   114         for k, v in kwmaps.items():
   114         for k, v in kwmaps.items():
   115             _repo.ui.setconfig('keywordmaps', k, v)
   115             _repo.ui.setconfig('keywordmaps', k, v)
   116     reposetup(_repo.ui, _repo)
   116     reposetup(_repo.ui, _repo)
   117     ui.status(_('config with %s keyword maps:\n') % kwstatus)
   117     ui.status(_('config with %s keyword maps:\n') % kwstatus)
   118     ui.write('[keyword]\n%s =\n[keywordmaps\n' % fn)
   118     ui.write('[keyword]\n%s =\n[keywordmaps]\n' % fn)
   119     for k, v in kwmaps.items():
   119     for k, v in kwmaps.items():
   120         ui.write('%s = %s\n' % (k, v))
   120         ui.write('%s = %s\n' % (k, v))
   121     path = _repo.wjoin(fn)
   121     path = _repo.wjoin(fn)
   122     keywords = '$' + '$\n$'.join(kwmaps.keys()) + '$\n'
   122     keywords = '$' + '$\n$'.join(kwmaps.keys()) + '$\n'
   123     _repo.wfile(fn, 'w').write(keywords)
   123     _repo.wfile(fn, 'w').write(keywords)