comparison python/hgrc.py @ 465:ae2db9e613f1

python/hgrc.py
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 10 Aug 2013 18:45:12 -0700
parents 2588ca4ae849
children 3ffcbffb6fb4
comparison
equal deleted inserted replaced
464:35f3730870e7 465:ae2db9e613f1
32 if not args: 32 if not args:
33 args = [subprocess.check_output(['hg', 'root']).strip()] 33 args = [subprocess.check_output(['hg', 'root']).strip()]
34 34
35 # if not specified, set a default action 35 # if not specified, set a default action
36 default_action = 'default_push_ssh' 36 default_action = 'default_push_ssh'
37 actions = ('default_push', 37 avaiable_actions = ('default_push',
38 'default_push_ssh', 38 'default_push_ssh',
39 ) 39 'list_hgrc',
40 )
41 actions = dict([(name, getattr(options, name))
42 for name in available_actions
43 if getattr(options, name) is not None])
44 if not actions:
45 actions = {'default_push_ssh': True}
40 46
41 # find all hgrc files 47 # find all hgrc files
42 hgrc = [] 48 hgrc = []
43 missing = [] 49 missing = []
44 not_hg = [] 50 not_hg = []
87 93
88 # print the chosen hgrc paths 94 # print the chosen hgrc paths
89 if options.list_hgrc: 95 if options.list_hgrc:
90 print '\n'.join(hgrc) 96 print '\n'.join(hgrc)
91 97
98 # alter .hgrc files
99 for path, ini in config.items():
100 import pdb; pdb.set_trace()
92 101
93 if __name__ == '__main__': 102 if __name__ == '__main__':
94 main() 103 main()