# HG changeset patch # User Jeff Hammel # Date 1376182413 25200 # Node ID f7c49c61f092a8e7d378517ef535ca09c4aad45c # Parent be91c9fb31477b760e83a02651fdc85abe1ddb60 python/setup_repo.py diff -r be91c9fb3147 -r f7c49c61f092 python/setup_repo.py --- 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()