changeset 470:949ca4b2f2d1

python/hgrc.py
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 10 Aug 2013 19:04:19 -0700
parents 764535e1f991
children dc179368b7d0
files python/hgrc.py
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/python/hgrc.py	Sat Aug 10 18:54:29 2013 -0700
+++ b/python/hgrc.py	Sat Aug 10 19:04:19 2013 -0700
@@ -108,13 +108,20 @@
                 config[path].read(path)
 
     # print the chosen hgrc paths
-    if options.list_hgrc:
+    if actions.pop('list_hgrc', None):
         print '\n'.join(hgrc)
 
+    # map of actions -> functions;
+    # XXX this is pretty improv; to be improved
+    action_map = {'default_push_ssh': set_default_push_to_ssh
+                  'default_push': set_default_push
+        }
+
     # alter .hgrc files
-    for path, ini in config.items():
+    while actions:
 
-        import pdb; pdb.set_trace()
+        for path, ini in config.items():
+            import pdb; pdb.set_trace()
 
 if __name__ == '__main__':
     main()