changeset 454:f7c49c61f092

python/setup_repo.py
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 10 Aug 2013 17:53:33 -0700
parents be91c9fb3147
children 81a237bcf3b6
files python/setup_repo.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/python/setup_repo.py	Sat Aug 10 17:14:09 2013 -0700
+++ b/python/setup_repo.py	Sat Aug 10 17:53:33 2013 -0700
@@ -11,7 +11,7 @@
 # TODO:
 # There are patterns here...
 # - actions
-# - ...
+# - --dry-run/call()
 
 import os
 import subprocess
@@ -20,7 +20,8 @@
 
 from optparse import OptionParser
 
-call = subprocess.check_output
+def call(command, *args, **kwargs):
+    return subprocess.check_output(*args, **kwargs)
 
 def init_repo(directory):
     """setup repository"""
@@ -119,7 +120,9 @@
         setup_remote(directory, options.remote_url, name=name, remote_path=options.remote_path)
 
         # push changes
-        call(['hg', 'push', '-R', directory])
+        command = ['hg', 'push', '-R', directory]
+        print command
+        # call(command)
 
 if __name__ == '__main__':
   main()