public void run(InputStream in, PrintStream out, PrintStream err) throws SVNException {
run(out, err);
}
public void run(PrintStream out, PrintStream err) throws SVNException {
SVNWCClient wcClient = getClientManager().getWCClient();
SVNRevision revision = SVNRevision.BASE;
if (getCommandLine().hasArgument(SVNArgument.REVISION)) {
revision = SVNRevision.parse((String) getCommandLine().getArgumentValue(SVNArgument.REVISION));
}
for (int index = 0; index < getCommandLine().getPathCount(); index++) {
final String absolutePath = getCommandLine().getPathAt(index);
SVNRevision pegRevision = getCommandLine().getPathPegRevision(index);
try {
wcClient.doGetFileContents(new File(absolutePath), pegRevision, revision, true, out);
} catch (SVNException e) {
String message = e.getMessage();
err.println(message);
}
out.flush();
}
revision = SVNRevision.HEAD;
if (getCommandLine().hasArgument(SVNArgument.REVISION)) {
revision = SVNRevision.parse((String) getCommandLine().getArgumentValue(SVNArgument.REVISION));
}
for (int index = 0; index < getCommandLine().getURLCount(); index++) {
final String url = getCommandLine().getURL(index);
SVNRevision pegRevision = getCommandLine().getPegRevision(index);
try {
wcClient.doGetFileContents(SVNURL.parseURIEncoded(url), pegRevision, revision, true, out);
} catch (SVNException e) {
String message = e.getMessage();
err.println(message);
}
out.flush();