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)))

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 return the output of the command cmd the command to run .