Mercurial > hg > config
comparison python/hgrc.py @ 471:dc179368b7d0
python/hgrc.py
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 10 Aug 2013 19:05:32 -0700 |
parents | 949ca4b2f2d1 |
children | 57dfffa7e44a |
comparison
equal
deleted
inserted
replaced
470:949ca4b2f2d1 | 471:dc179368b7d0 |
---|---|
111 if actions.pop('list_hgrc', None): | 111 if actions.pop('list_hgrc', None): |
112 print '\n'.join(hgrc) | 112 print '\n'.join(hgrc) |
113 | 113 |
114 # map of actions -> functions; | 114 # map of actions -> functions; |
115 # XXX this is pretty improv; to be improved | 115 # XXX this is pretty improv; to be improved |
116 action_map = {'default_push_ssh': set_default_push_to_ssh | 116 action_map = {'default_push_ssh': set_default_push_to_ssh, |
117 'default_push': set_default_push | 117 'default_push': set_default_push |
118 } | 118 } |
119 | 119 |
120 # alter .hgrc files | 120 # alter .hgrc files |
121 action_names = actions.keys() | |
121 while actions: | 122 while actions: |
122 | 123 |
124 # XXX crappy | |
125 action, parameter = actions.pop(action_names.pop()) | |
126 | |
127 # apply to all files | |
123 for path, ini in config.items(): | 128 for path, ini in config.items(): |
124 import pdb; pdb.set_trace() | 129 import pdb; pdb.set_trace() |
125 | 130 |
126 if __name__ == '__main__': | 131 if __name__ == '__main__': |
127 main() | 132 main() |