# HG changeset patch # User Jeff Hammel # Date 1376185512 25200 # Node ID ae2db9e613f1bb46158bb4b3940827e307bf3469 # Parent 35f3730870e7ff3bf6bee63337836d599e8ad666 python/hgrc.py diff -r 35f3730870e7 -r ae2db9e613f1 python/hgrc.py --- a/python/hgrc.py Sat Aug 10 18:34:47 2013 -0700 +++ b/python/hgrc.py Sat Aug 10 18:45:12 2013 -0700 @@ -34,9 +34,15 @@ # if not specified, set a default action default_action = 'default_push_ssh' - actions = ('default_push', - 'default_push_ssh', - ) + avaiable_actions = ('default_push', + 'default_push_ssh', + 'list_hgrc', + ) + actions = dict([(name, getattr(options, name)) + for name in available_actions + if getattr(options, name) is not None]) + if not actions: + actions = {'default_push_ssh': True} # find all hgrc files hgrc = [] @@ -89,6 +95,9 @@ if options.list_hgrc: print '\n'.join(hgrc) + # alter .hgrc files + for path, ini in config.items(): + import pdb; pdb.set_trace() if __name__ == '__main__': main()