comparison python/hgrc.py @ 473:da087c5724d4

python/hgrc.py
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 10 Aug 2013 19:11:11 -0700
parents 57dfffa7e44a
children 3326aea03a3b
comparison
equal deleted inserted replaced
472:57dfffa7e44a 473:da087c5724d4
22 22
23 def set_default_push_to_ssh(parser): 23 def set_default_push_to_ssh(parser):
24 """ 24 """
25 pass 25 pass
26 """ 26 """
27
28 # get default path
29 default = ''
27 30
28 def main(args=sys.argv[1:]): 31 def main(args=sys.argv[1:]):
29 32
30 # parse command line arguments 33 # parse command line arguments
31 usage = '%prog [options] repository <repository> <...>' 34 usage = '%prog [options] repository <repository> <...>'
122 while actions: 125 while actions:
123 126
124 # XXX crappy 127 # XXX crappy
125 action_name = action_names.pop() 128 action_name = action_names.pop()
126 parameter = actions.pop(action_name) 129 parameter = actions.pop(action_name)
130 method = action_map[action_name]
127 131
128 # apply to all files 132 # apply to all files
129 for path, ini in config.items(): 133 for path, ini in config.items():
130 import pdb; pdb.set_trace() 134 if parameter is not None:
135 method(ini, parameter)
136 else:
137 method(ini)
138
131 139
132 if __name__ == '__main__': 140 if __name__ == '__main__':
133 main() 141 main()