}
private long doRemoteExport(SVNRepository repository, final long revNumber, File dstPath, String eolStyle, boolean force, SVNDepth depth) throws SVNException {
SVNNodeKind dstKind = repository.checkPath("", revNumber);
if (dstKind == SVNNodeKind.DIR) {
SVNExportEditor editor = new SVNExportEditor(this, repository.getLocation().toString(), dstPath, force, eolStyle, isExportExpandsKeywords(), getOptions());
repository.update(revNumber, null, depth, false, new ISVNReporterBaton() {
public void report(ISVNReporter reporter) throws SVNException {
reporter.setPath("", null, revNumber, SVNDepth.INFINITY, true);
reporter.finishReport();
}
}, SVNCancellableEditor.newInstance(editor, this, getDebugLog()));
// nothing may be created.
SVNFileType fileType = SVNFileType.getType(dstPath);
if (fileType == SVNFileType.NONE) {
editor.openRoot(revNumber);
}
if (!isIgnoreExternals() && depth == SVNDepth.INFINITY) {
Map externals = editor.getCollectedExternals();
handleExternals(null, dstPath, Collections.EMPTY_MAP, externals, Collections.EMPTY_MAP, repository.getLocation(), repository.getRepositoryRoot(true),
depth, true, true);
}
} else if (dstKind == SVNNodeKind.FILE) {
String url = repository.getLocation().toString();