SVNEntry entry = (SVNEntry) entries.next();
SVNEntry2 entry = (SVNEntry2) entries.next();
    private SVNAdminArea doOpen(File path, boolean writeLock, int depth, Map tmp) throws SVNException {        // no support for 'under consturction here' - it will go to adminAreaFactory.        tmp = tmp == null ? new HashMap() : tmp;         if (myAdminAreas != null) {            SVNAdminArea existing = (SVNAdminArea) myAdminAreas.get(path);            if (existing != null && existing != SVNAdminArea.MISSING) {                SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_LOCKED, "Working copy ''{0}'' locked", path);                SVNErrorManager.error(error);            }        } else {            myAdminAreas = new HashMap();        }                SVNAdminArea area = SVNAdminAreaFactory.open(path);        if (writeLock) {            area.lock();            area = SVNAdminAreaFactory.upgrade(area);        }                if (depth != 0) {            if (depth > 0) {                depth--;            }            for(Iterator entries = area.entries(false); entries.hasNext();) {                try {                    checkCancelled();                 } catch (SVNCancelException e) {                    doClose(tmp, false);                    throw e;                }                                SVNEntry entry = (SVNEntry) entries.next();                if (entry.getKind() != SVNNodeKind.DIR  || area.getThisDirName().equals(entry.getName())) {                    continue;                }                File childPath = new File(path, entry.getName());                try {                    // this method will put created area into our map.                    doOpen(childPath, writeLock, depth, tmp);                } catch (SVNException e) {                    if (e.getErrorMessage().getErrorCode() != SVNErrorCode.WC_NOT_DIRECTORY) {                        doClose(tmp, false);                        throw e;                    }                    tmp.put(childPath, SVNAdminArea.MISSING);                    continue;                }            }        }        tmp.put(path, area);        return area;    }