Source:
private CommandLineResult runCommand(Map<String, String> env, List<String> args, File projectPath, List<String> paths, String username, String password, String repoUrl) throws IOException, SubversionException, UnauthorizedException { final List<String> lines = new ArrayList<>(); final CommandLineResult result; final StringBuffer buffer; boolean isWarning = false; for (final String path : paths) { args.add(path); } String[] credentialsArgs; if (username != null && password != null) { credentialsArgs = new String[]{"--username", username, "--password", password}; } else { credentialsArgs = null; } SshEnvironment sshEnvironment = null; if (SshEnvironment.isSSH(repoUrl)) { sshEnvironment = new SshEnvironment(sshScriptProvider, repoUrl); if (env == null) { env = new HashMap<>(); } env.putAll(sshEnvironment.get()); } try { result = UpstreamUtils.executeCommandLine(env, "svn", args.toArray(new String[args.size()]), credentialsArgs, -1, projectPath, svnOutputPublisherFactory); } finally { if (sshEnvironment != null) { sshEnvironment.cleanUp(); } } if (result.getExitCode() != 0) { buffer = new StringBuffer(); lines.addAll(result.getStdout()); lines.addAll(result.getStderr()); for (final String line : lines) { if (line.startsWith("svn: warning: ")) { isWarning = true; } buffer.append(line); buffer.append("\n"); } if (!isWarning) { String errorMessage = buffer.toString(); if (errorMessage.endsWith("Authentication failed\n")) { throw new UnauthorizedException("Authentication failed", ErrorCodes.UNAUTHORIZED_SVN_OPERATION); } else { throw new SubversionException(errorMessage); } } } return result; }

Target:
private CommandLineResult runCommand(Map<String, String> env, List<String> args, File projectPath, List<String> paths, String username, String password, String repoUrl) throws IOException, SubversionException, UnauthorizedException { final List<String> lines = new ArrayList<>(); final CommandLineResult result; final StringBuffer buffer; boolean isWarning = false; for (final String path : paths) { args.add(path); } String[] credentialsArgs; if (!isNullOrEmpty(username) && !isNullOrEmpty(password)) { credentialsArgs = new String[]{"--username", username, "--password", password}; } else { credentialsArgs = null; } SshEnvironment sshEnvironment = null; if (SshEnvironment.isSSH(repoUrl)) { sshEnvironment = new SshEnvironment(sshScriptProvider, repoUrl); if (env == null) { env = new HashMap<>(); } env.putAll(sshEnvironment.get()); } try { result = UpstreamUtils.executeCommandLine(env, "svn", args.toArray(new String[args.size()]), credentialsArgs, -1, projectPath, svnOutputPublisherFactory); } finally { if (sshEnvironment != null) { sshEnvironment.cleanUp(); } } if (result.getExitCode() != 0) { buffer = new StringBuffer(); lines.addAll(result.getStdout()); lines.addAll(result.getStderr()); for (final String line : lines) { if (line.startsWith("svn: warning: ")) { isWarning = true; } buffer.append(line); buffer.append("\n"); } if (!isWarning) { String errorMessage = buffer.toString(); if (errorMessage.endsWith("Authentication failed\n")) { throw new UnauthorizedException("Authentication failed", ErrorCodes.UNAUTHORIZED_SVN_OPERATION); } else { throw new SubversionException(errorMessage); } } } return result; }