String srcURL = infos[i].getOldURL();
SVNURL srcURL = infos[i].getOldURL();
    private long doRemoteExport(SVNRepository repository, final long revNumber, File dstPath, String eolStyle, boolean force, boolean recursive) throws SVNException {        SVNNodeKind dstKind = repository.checkPath("", revNumber);        if (dstKind == SVNNodeKind.DIR) {            SVNExportEditor editor = new SVNExportEditor(this, repository.getLocation().toString(), dstPath,  force, eolStyle);            repository.update(revNumber, null, recursive, new ISVNReporterBaton() {                public void report(ISVNReporter reporter) throws SVNException {                    reporter.setPath("", null, revNumber, true);                    reporter.finishReport();                }            }, editor);            // nothing may be created.            SVNFileType fileType = SVNFileType.getType(dstPath);            if (fileType == SVNFileType.NONE) {                editor.openRoot(revNumber);            }            if (!isIgnoreExternals() && recursive) {                Map externals = editor.getCollectedExternals();                for (Iterator files = externals.keySet().iterator(); files.hasNext();) {                    File rootFile = (File) files.next();                    String propValue = (String) externals.get(rootFile);                    if (propValue == null) {                        continue;                    }                    SVNExternalInfo[] infos = SVNWCAccess.parseExternals("", propValue);                    for (int i = 0; i < infos.length; i++) {                        File targetDir = new File(rootFile, infos[i].getPath());                        String srcURL = infos[i].getOldURL();                        SVNRevision srcRevision = SVNRevision.create(infos[i].getOldRevision());                        String relativePath =  targetDir.equals(dstPath) ? "" : targetDir.getAbsolutePath().substring(dstPath.getAbsolutePath().length() + 1);                        relativePath = relativePath.replace(File.separatorChar, '/');                        dispatchEvent(SVNEventFactory.createUpdateExternalEvent(null, relativePath));                        try {                            setEventPathPrefix(relativePath);                            doExport(srcURL, targetDir, srcRevision, srcRevision, eolStyle, force, recursive);                        } catch (Throwable th) {                            dispatchEvent(new SVNEvent(th.getMessage()));                        } finally {                            setEventPathPrefix(null);                        }                    }                }            }        } else if (dstKind == SVNNodeKind.FILE) {            String url = repository.getLocation().toString();            if (dstPath.isDirectory()) {                dstPath = new File(dstPath, SVNEncodingUtil.uriDecode(SVNPathUtil.tail(url)));            }            if (dstPath.exists()) {                if (!force) {                    SVNErrorManager.error("svn: '" + dstPath + "' already exists");                }            } else {                dstPath.getParentFile().mkdirs();            }            Map properties = new HashMap();            OutputStream os = null;            File tmpFile = SVNFileUtil.createUniqueFile(dstPath.getParentFile(), dstPath.getName(), ".tmp");            os = SVNFileUtil.openFileForWriting(tmpFile);            try {                repository.getFile("", revNumber, properties, os);            } finally {                SVNFileUtil.closeFile(os);            }            if (force && dstPath.exists()) {                SVNFileUtil.deleteAll(dstPath);            }            Map keywords = SVNTranslator.computeKeywords((String) properties.get(SVNProperty.KEYWORDS), url,                            (String) properties.get(SVNProperty.LAST_AUTHOR),                            (String) properties.get(SVNProperty.COMMITTED_DATE),                            (String) properties.get(SVNProperty.COMMITTED_REVISION));            if (eolStyle == null) {                eolStyle = (String) properties.get(SVNProperty.EOL_STYLE);            }            byte[] eols = SVNTranslator.getWorkingEOL(eolStyle);            SVNTranslator.translate(tmpFile, dstPath, eols, keywords, properties.get(SVNProperty.SPECIAL) != null, true);            tmpFile.delete();            if (properties.get(SVNProperty.EXECUTABLE) != null) {                SVNFileUtil.setExecutable(dstPath, true);            }            dispatchEvent(SVNEventFactory.createExportAddedEvent(dstPath.getParentFile(), dstPath, SVNNodeKind.FILE));                    }        return revNumber;    }