hgext/keyword.py
changeset 10714 9c0a1887bd4b
parent 10713 b9c3f8e88e4f
child 10844 6722ba3bf80b
equal deleted inserted replaced
10713:b9c3f8e88e4f 10714:9c0a1887bd4b
   320         ui.status(_('\n\tconfiguration using current keyword template maps\n'))
   320         ui.status(_('\n\tconfiguration using current keyword template maps\n'))
   321         kwmaps = dict(uikwmaps) or kwtemplater.templates
   321         kwmaps = dict(uikwmaps) or kwtemplater.templates
   322 
   322 
   323     uisetup(ui)
   323     uisetup(ui)
   324     reposetup(ui, repo)
   324     reposetup(ui, repo)
   325     for k, v in ui.configitems('extensions'):
   325     ui.write('[extensions]\nkeyword =\n')
   326         if k.endswith('keyword'):
       
   327             extension = '%s = %s' % (k, v)
       
   328             break
       
   329     ui.write('[extensions]\n%s\n' % extension)
       
   330     demoitems('keyword', ui.configitems('keyword'))
   326     demoitems('keyword', ui.configitems('keyword'))
   331     demoitems('keywordmaps', kwmaps.iteritems())
   327     demoitems('keywordmaps', kwmaps.iteritems())
   332     keywords = '$' + '$\n$'.join(sorted(kwmaps.keys())) + '$\n'
   328     keywords = '$' + '$\n$'.join(sorted(kwmaps.keys())) + '$\n'
   333     repo.wopener(fn, 'w').write(keywords)
   329     repo.wopener(fn, 'w').write(keywords)
   334     repo.add([fn])
   330     repo.add([fn])