I have been using this as a reference, but not able to accomplish exactly what I need: Calling an external command in Python
I also was reading this: http://www.pyth
Don't use shell=True
. It will needlessy invoke the shell to call your svn
program, and that will give you the shell's return code instead of svn's.
repos = ['/repo1', '/repo2', '/repo3']
# launch 3 async calls:
procs = [subprocess.Popen(['svn', 'update', repo]) for repo in repos]
# wait.
for proc in procs:
proc.wait()
# check for results:
if any(proc.returncode != 0 for proc in procs):
print 'Something failed'