targets.add("");
}
if (getSVNEnvironment().isRevprop()) {
SVNURL url = getRevpropURL(getSVNEnvironment().getStartRevision(), targets);
SVNWCClient wcClient = getSVNEnvironment().getClientManager().getWCClient();
long rev = wcClient.doGetRevisionProperty(url, null, getSVNEnvironment().getStartRevision(), this);
Map revisionPropertiesMap = getRevisionProperties();
List revisionProperties = (List) revisionPropertiesMap.get(new Long(rev));
if (revisionProperties == null) {
revisionProperties = Collections.EMPTY_LIST;
}
if (getSVNEnvironment().isXML()) {
printXMLHeader("properties");
StringBuffer buffer = openXMLTag("revprops", SVNXMLUtil.XML_STYLE_NORMAL, "rev", Long.toString(rev), null);
for (Iterator props = revisionProperties.iterator(); props.hasNext();) {
SVNPropertyData property = (SVNPropertyData) props.next();
buffer = addXMLProp(property, buffer);
}
buffer = closeXMLTag("revprops", buffer);
getSVNEnvironment().getOut().print(buffer);
printXMLFooter("properties");
} else {
getSVNEnvironment().getOut().println("Unversioned properties on revision " + rev + ":");
for (Iterator props = revisionProperties.iterator(); props.hasNext();) {
SVNPropertyData property = (SVNPropertyData) props.next();
getSVNEnvironment().getOut().print(" " + property.getName());
if (getSVNEnvironment().isVerbose()) {
getSVNEnvironment().getOut().print(" : ");
if (property.getValue().isString()){
getSVNEnvironment().getOut().print(property.getValue().getString());
} else {
try {
getSVNEnvironment().getOut().write(property.getValue().getBytes());
} catch (IOException e) {
}
}
}
getSVNEnvironment().getOut().println();
}
}
clearCollectedProperties();
} else {
if (getSVNEnvironment().isXML()) {
printXMLHeader("properties");
}
SVNDepth depth = getSVNEnvironment().getDepth();
if (depth == SVNDepth.UNKNOWN) {
depth = SVNDepth.EMPTY;
}
Collection changeLists = getSVNEnvironment().getChangelistsCollection();
SVNWCClient client = getSVNEnvironment().getClientManager().getWCClient();
for (Iterator ts = targets.iterator(); ts.hasNext();) {
String targetPath = (String) ts.next();
SVNPath target = new SVNPath(targetPath, true);
SVNRevision pegRevision = target.getPegRevision();
try {
if (target.isURL()) {
client.doGetProperty(target.getURL(), null, pegRevision, getSVNEnvironment().getStartRevision(), depth, this);
} else {
client.doGetProperty(target.getFile(), null, pegRevision,
getSVNEnvironment().getStartRevision(), depth, this, changeLists);
}
} catch (SVNException e) {
getSVNEnvironment().handleWarning(e.getErrorMessage(),
new SVNErrorCode[] {SVNErrorCode.UNVERSIONED_RESOURCE, SVNErrorCode.ENTRY_NOT_FOUND},