authenticate();
List values = read("(?l)", null, false);
values = (List) values.get(0);
if (values != null) {
List direntProps = SVNReader.parseTuple("wnsr(?s)(?s)", values, null);
SVNNodeKind kind = SVNNodeKind.parseKind(SVNReader.getString(direntProps, 0));
long size = SVNReader.getLong(direntProps, 1);
boolean hasProps = SVNReader.getBoolean(direntProps, 2);
long createdRevision = SVNReader.getLong(direntProps, 3);
Date createdDate = SVNDate.parseDate(SVNReader.getString(direntProps, 4));
String lastAuthor = SVNReader.getString(direntProps, 5);
parentEntry = new SVNDirEntry(url, repositoryRoot, "", kind, size, hasProps, createdRevision, createdDate, lastAuthor);
}
// get entries.
buffer = new Object[]{"get-dir", path, rev, Boolean.FALSE, Boolean.TRUE};
write("(w(s(n)ww))", buffer);
authenticate();
values = read("rll", null, false);
revision = values.get(0) != null ? SVNReader.getLong(values, 0) : revision;
if (handler != null) {
List dirents = (List) values.get(2);
for (Iterator iterator = dirents.iterator(); iterator.hasNext();) {
SVNItem item = (SVNItem) iterator.next();
if (item.getKind() != SVNItem.LIST) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_SVN_MALFORMED_DATA, "Dirlist element not a list");
SVNErrorManager.error(err, SVNLogType.NETWORK);
}
List direntProps = SVNReader.parseTuple("swnsr(?s)(?s)", item.getItems(), null);
String name = SVNReader.getString(direntProps, 0);
SVNNodeKind kind = SVNNodeKind.parseKind(SVNReader.getString(direntProps, 1));
long size = SVNReader.getLong(direntProps, 2);
boolean hasProps = SVNReader.getBoolean(direntProps, 3);
long createdRevision = SVNReader.getLong(direntProps, 4);
Date createdDate = SVNDate.parseDate(SVNReader.getString(direntProps, 5));
String lastAuthor = SVNReader.getString(direntProps, 6);