Mercurial > hg > config
comparison python/hgrc.py @ 470:949ca4b2f2d1
python/hgrc.py
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Sat, 10 Aug 2013 19:04:19 -0700 |
| parents | 764535e1f991 |
| children | dc179368b7d0 |
comparison
equal
deleted
inserted
replaced
| 469:764535e1f991 | 470:949ca4b2f2d1 |
|---|---|
| 106 if isinstance(path, basestring): | 106 if isinstance(path, basestring): |
| 107 if os.path.exists(path): | 107 if os.path.exists(path): |
| 108 config[path].read(path) | 108 config[path].read(path) |
| 109 | 109 |
| 110 # print the chosen hgrc paths | 110 # print the chosen hgrc paths |
| 111 if options.list_hgrc: | 111 if actions.pop('list_hgrc', None): |
| 112 print '\n'.join(hgrc) | 112 print '\n'.join(hgrc) |
| 113 | 113 |
| 114 # map of actions -> functions; | |
| 115 # XXX this is pretty improv; to be improved | |
| 116 action_map = {'default_push_ssh': set_default_push_to_ssh | |
| 117 'default_push': set_default_push | |
| 118 } | |
| 119 | |
| 114 # alter .hgrc files | 120 # alter .hgrc files |
| 115 for path, ini in config.items(): | 121 while actions: |
| 116 | 122 |
| 117 import pdb; pdb.set_trace() | 123 for path, ini in config.items(): |
| 124 import pdb; pdb.set_trace() | |
| 118 | 125 |
| 119 if __name__ == '__main__': | 126 if __name__ == '__main__': |
| 120 main() | 127 main() |
