changeset 465:ae2db9e613f1

python/hgrc.py
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 10 Aug 2013 18:45:12 -0700
parents 35f3730870e7
children 3ffcbffb6fb4
files python/hgrc.py
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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()