SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
}
if (!hasRepositoryRoot()) {
connection.fetchRepositoryRoot(this);
}
SVNURL repositryRoot = getRepositoryRoot(false);
for(Iterator dirEnts = dirEntsMap.keySet().iterator(); dirEnts.hasNext();) {
String url = (String) dirEnts.next();
DAVProperties child = (DAVProperties) dirEntsMap.get(url);
String href = child.getURL();
if (parentPathSegments == SVNPathUtil.getSegmentsCount(href)) {
continue;
}
String name = SVNEncodingUtil.uriDecode(SVNPathUtil.tail(href));
SVNNodeKind kind = SVNNodeKind.UNKNOWN;
if ((entryFields & SVNDirEntry.DIRENT_KIND) != 0) {
kind = child.isCollection() ? SVNNodeKind.DIR : SVNNodeKind.FILE;
}
long size = 0;
if ((entryFields & SVNDirEntry.DIRENT_SIZE) != 0) {
SVNPropertyValue sizeValue = child.getPropertyValue(DAVElement.GET_CONTENT_LENGTH);
if (sizeValue != null) {
try {
size = Long.parseLong(sizeValue.getString());
} catch (NumberFormatException nfe) {
SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA, nfe), SVNLogType.NETWORK);
}
}
}
boolean hasProperties = false;
if ((entryFields & SVNDirEntry.DIRENT_HAS_PROPERTIES) != 0) {
if (supportsDeadPropCount) {
SVNPropertyValue propVal = child.getPropertyValue(DAVElement.DEADPROP_COUNT);
if (propVal == null) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.INCOMPLETE_DATA,
"Server response missing the expected deadprop-count property");
SVNErrorManager.error(err, SVNLogType.NETWORK);
} else {
long propCount = -1;
try {
propCount = Long.parseLong(propVal.getString());
} catch (NumberFormatException nfe) {
SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA, nfe), SVNLogType.NETWORK);
}
hasProperties = propCount > 0;
}
} else {
for(Iterator props = child.getProperties().keySet().iterator(); props.hasNext();) {
DAVElement property = (DAVElement) props.next();
if (DAVElement.SVN_CUSTOM_PROPERTY_NAMESPACE.equals(property.getNamespace()) ||
DAVElement.SVN_SVN_PROPERTY_NAMESPACE.equals(property.getNamespace())) {
hasProperties = true;
break;
}
}
}
}
long lastRevision = INVALID_REVISION;
if ((entryFields & SVNDirEntry.DIRENT_CREATED_REVISION) != 0) {
Object revisionStr = child.getPropertyValue(DAVElement.VERSION_NAME);
try {
lastRevision = Long.parseLong(revisionStr.toString());
} catch (NumberFormatException nfe) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA);
SVNErrorManager.error(err, SVNLogType.NETWORK);
}
}
Date date = null;
if ((entryFields & SVNDirEntry.DIRENT_TIME) != 0) {
SVNPropertyValue dateValue = child.getPropertyValue(DAVElement.CREATION_DATE);
if (dateValue != null) {
date = SVNDate.parseDate(dateValue.getString());
}
}
String author = null;
if ((entryFields & SVNDirEntry.DIRENT_LAST_AUTHOR) != 0) {
SVNPropertyValue authorValue = child.getPropertyValue(DAVElement.CREATOR_DISPLAY_NAME);
author = authorValue == null ? null : authorValue.getString();
}
SVNURL childURL = getLocation().setPath(fullPath, true);
childURL = childURL.appendPath(name, false);
SVNDirEntry dirEntry = new SVNDirEntry(childURL, repositryRoot, name, kind, size, hasProperties, lastRevision, date, author);
handler.handleDirEntry(dirEntry);
}
}
if (properties != null) {