hgext/keyword.py
changeset 28458 311472301ef3
parent 28321 a7b453b47726
child 28694 9a6fa1d93bc8
equal deleted inserted replaced
28457:e6310cdcc4d0 28458:311472301ef3
   428                 ui.status(_('\toverriding default cvs keywordset\n'))
   428                 ui.status(_('\toverriding default cvs keywordset\n'))
   429         if opts.get('rcfile'):
   429         if opts.get('rcfile'):
   430             ui.readconfig(opts.get('rcfile'))
   430             ui.readconfig(opts.get('rcfile'))
   431         if args:
   431         if args:
   432             # simulate hgrc parsing
   432             # simulate hgrc parsing
   433             rcmaps = ['[keywordmaps]\n'] + [a + '\n' for a in args]
   433             rcmaps = '[keywordmaps]\n%s\n' % '\n'.join(args)
   434             fp = repo.vfs('hgrc', 'w')
   434             repo.vfs.write('hgrc', rcmaps)
   435             fp.writelines(rcmaps)
       
   436             fp.close()
       
   437             ui.readconfig(repo.join('hgrc'))
   435             ui.readconfig(repo.join('hgrc'))
   438         kwmaps = dict(ui.configitems('keywordmaps'))
   436         kwmaps = dict(ui.configitems('keywordmaps'))
   439     elif opts.get('default'):
   437     elif opts.get('default'):
   440         if svn:
   438         if svn:
   441             ui.status(_('\n\tconfiguration using default svn keywordset\n'))
   439             ui.status(_('\n\tconfiguration using default svn keywordset\n'))