def _run_svn(cmd, cwd, user, username, password, opts, **kwargs):
    cmd = ['svn', '--non-interactive', cmd]

    options = list(opts)
    if username:
        options.extend(['--username', username])
    if password:
        options.extend(['--password', password])
    cmd.extend(options)

    result = __salt__['cmd.run_all'](cmd, python_shell=False, cwd=cwd, runas=user, **kwargs)

    retcode = result['retcode']

    if retcode == 0:
        return result['stdout']
    raise exceptions.CommandExecutionError(result['stderr'] + '\n\n' + ' '.join(cmd))
Execute svn
dataset/ETHPy150Open saltstack/salt/salt/modules/svn.py/_run_svn