DAVElement[] entryProperties = {DAVElement.VERSION_NAME, DAVElement.GET_CONTENT_LENGTH, DAVElement.RESOURCE_TYPE, DAVElement.CREATION_DATE, DAVElement.CREATOR_DISPLAY_NAME};
    public long getDir(String path, long revision, final Map properties, final ISVNDirEntryHandler handler) throws SVNException {        long dirRevision = revision;        DAVElement[] entryProperties = {DAVElement.VERSION_NAME, DAVElement.GET_CONTENT_LENGTH,                 DAVElement.RESOURCE_TYPE, DAVElement.CREATION_DATE, DAVElement.CREATOR_DISPLAY_NAME};        try {            openConnection();            path = getFullPath(path);            path = PathUtil.encode(path);            if (revision != -2) {                DAVBaselineInfo info = DAVUtil.getBaselineInfo(myConnection, path, revision, false, true, null);                path = PathUtil.append(info.baselineBase, info.baselinePath);                dirRevision = info.revision;             }            if (handler != null) {                final String parentPath = PathUtil.removeTrailingSlash(path);                myConnection.doPropfind(path, 1, null, entryProperties, new IDAVResponseHandler() {                    public void handleDAVResponse(DAVResponse child) {                        String href = PathUtil.removeTrailingSlash(child.getHref());                        href = PathUtil.decode(href);                        if (href.equals(PathUtil.decode(parentPath))) {                            return;                        }                        // build direntry                        String name = PathUtil.tail(href);                        SVNNodeKind kind = SVNNodeKind.FILE;                        Object revisionStr = child.getPropertyValue(DAVElement.VERSION_NAME);                        long lastRevision = Long.parseLong(revisionStr.toString());                        String sizeStr = (String) child.getPropertyValue(DAVElement.GET_CONTENT_LENGTH);                        long size = sizeStr == null ? 0 : Long.parseLong(sizeStr);                        if (child.getPropertyValue(DAVElement.RESOURCE_TYPE) == DAVElement.COLLECTION) {                            kind = SVNNodeKind.DIR;                        }                        String author = (String) child.getPropertyValue(DAVElement.CREATOR_DISPLAY_NAME);                        String dateStr = (String) child.getPropertyValue(DAVElement.CREATION_DATE);                        Date date = TimeUtil.parseDate(dateStr);                        boolean hasProperties = false;                        for(Iterator props = child.properties(); props.hasNext();) {                            DAVElement property = (DAVElement) props.next();                            if (DAVElement.SVN_CUSTOM_PROPERTY_NAMESPACE.equals(property.getNamespace()) ||                                     DAVElement.SVN_SVN_PROPERTY_NAMESPACE.equals(property)) {                                hasProperties = true;                                break;                            }                        }                        SVNDirEntry dirEntry = new SVNDirEntry(name, kind, size, hasProperties, lastRevision, date, author);                                                handler.handleDirEntry(dirEntry);                    }                });            }            if (properties != null) {            	myConnection.doPropfind(path, 0, null, null, new IDAVResponseHandler() {					public void handleDAVResponse(DAVResponse response) {						DAVUtil.filterProperties(response, properties);                        for(Iterator props = response.properties(); props.hasNext();) {                            DAVElement property = (DAVElement) props.next();                            if (property == DAVElement.VERSION_NAME) {                                properties.put(SVNProperty.COMMITTED_REVISION, response.getPropertyValue(property));                            } else if (property == DAVElement.CREATOR_DISPLAY_NAME) {                                properties.put(SVNProperty.LAST_AUTHOR, response.getPropertyValue(property));                            } else if (property == DAVElement.CREATION_DATE) {                                properties.put(SVNProperty.COMMITTED_DATE, response.getPropertyValue(property));                            }                        }					}            	});            }        } finally {            closeConnection();        }        return dirRevision;    }