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) |