boolean quiet = getCommandLine().hasArgument(SVNArgument.QUIET);
if (!getCommandLine().hasArgument(SVNArgument.XML)) {
getClientManager().setEventHandler(new SVNCommandEventProcessor(out, err, false));
}
SVNStatusClient stClient = getClientManager().getStatusClient();
ISVNStatusHandler handler = new SVNCommandStatusHandler(out, reportAll || showUpdates, reportAll, quiet, showUpdates);
SVNXMLSerializer serializer;
serializer = getCommandLine().hasArgument(SVNArgument.XML) ? new SVNXMLSerializer(System.out) : null;
if (serializer != null) {
handler = new SVNXMLStatusHandler(serializer);
if (!getCommandLine().hasArgument(SVNArgument.INCREMENTAL)) {
((SVNXMLStatusHandler) handler).startDocument();
}
}
boolean error = false;
for (int i = 0; i < paths.length; i++) {
String path = paths[i];
if (path == null) {
continue;
}
File file = new File(path).getAbsoluteFile();
if (serializer != null) {
((SVNXMLStatusHandler) handler).startTarget(new File(getCommandLine().getPathAt(i)));
}
long rev = -1;
try {
rev = stClient.doStatus(file, recursive, showUpdates, reportAll, ignored, handler);
} catch (SVNException e) {
stClient.getDebugLog().info(e);
err.println(e.getMessage());
error = true;
}
if (serializer != null) {
((SVNXMLStatusHandler) handler).endTarget(rev);