Merge pull request #19460 from jfindlay/split_svn

split svn command
This commit is contained in:
Thomas S Hatch 2015-01-07 13:52:14 -07:00
commit 8e775ab963

View File

@ -6,7 +6,6 @@ Subversion SCM
# Import python libs
import re
import shlex
import subprocess
# Import salt libs
from salt import utils, exceptions
@ -58,15 +57,15 @@ def _run_svn(cmd, cwd, user, username, password, opts, **kwargs):
kwargs
Additional options to pass to the run-cmd
'''
cmd = 'svn --non-interactive {0} '.format(cmd)
cmd = ['svn', '--non-interactive', cmd]
if username:
opts += ('--username', username)
opts.extend(['--username', username])
if password:
opts += ('--password', '\'{0}\''.format(password))
opts.extend(['--password', password])
if opts:
cmd += subprocess.list2cmdline(opts)
cmd.extend(opts)
result = __salt__['cmd.run_all'](cmd, cwd=cwd, runas=user, **kwargs)
result = __salt__['cmd.run_all'](cmd, python_shell=False, cwd=cwd, runas=user, **kwargs)
retcode = result['retcode']