targets = getSVNEnvironment().combineTargets(targets, true);
if (targets.isEmpty()) {
targets.add("");
}
myStatusPrinter = new SVNStatusPrinter(getSVNEnvironment());
SVNStatusClient client = getSVNEnvironment().getClientManager().getStatusClient();
if (!getSVNEnvironment().isXML()) {
client.setEventHandler(new SVNNotifyPrinter(getSVNEnvironment()));
}
if (getSVNEnvironment().isXML()) {
if (!getSVNEnvironment().isIncremental()) {
printXMLHeader("status");
}
} else if (getSVNEnvironment().isIncremental()) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "'incremental' option only valid in XML mode");
SVNErrorManager.error(err, SVNLogType.CLIENT);
}
Collection changeLists = getSVNEnvironment().getChangelistsCollection();
for (Iterator ts = targets.iterator(); ts.hasNext();) {
String target = (String) ts.next();
SVNPath commandTarget = new SVNPath(target);
if (getSVNEnvironment().isXML()) {
StringBuffer xmlBuffer = openXMLTag("target", SVNXMLUtil.XML_STYLE_NORMAL, "path", SVNCommandUtil.getLocalPath(target), null);
getSVNEnvironment().getOut().print(xmlBuffer);
}
try {
long rev = client.doStatus(commandTarget.getFile(), SVNRevision.HEAD,
getSVNEnvironment().getDepth(), getSVNEnvironment().isUpdate(),
getSVNEnvironment().isVerbose(), getSVNEnvironment().isNoIgnore(),
false, this, changeLists);
if (getSVNEnvironment().isXML()) {