SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_IS_DIRECTORY, "URL ''{0}'' refers to a directory", url);
SVNErrorManager.error(err, SVNLogType.WC);
}
checkCancelled();
if (!expandKeywords) {
repos.getFile("", revNumber, null, new SVNCancellableOutputStream(dst, this));
} else {
SVNProperties properties = new SVNProperties();
repos.getFile("", revNumber, properties, null);
checkCancelled();
String charset = SVNTranslator.getCharset(properties.getStringValue(SVNProperty.CHARSET), repos.getLocation().toDecodedString(), getOptions());
String keywords = properties.getStringValue(SVNProperty.KEYWORDS);
String eol = properties.getStringValue(SVNProperty.EOL_STYLE);
if (charset != null || keywords != null || eol != null) {
String cmtRev = properties.getStringValue(SVNProperty.COMMITTED_REVISION);
String cmtDate = properties.getStringValue(SVNProperty.COMMITTED_DATE);
String author = properties.getStringValue(SVNProperty.LAST_AUTHOR);
Map keywordsMap = SVNTranslator.computeKeywords(keywords, expandKeywords ? repos.getLocation().toString() : null, author, cmtDate, cmtRev, getOptions());
OutputStream translatingStream = SVNTranslator.getTranslatingOutputStream(dst, charset, SVNTranslator.getEOL(eol, getOptions()), false, keywordsMap, expandKeywords);
repos.getFile("", revNumber, null, new SVNCancellableOutputStream(translatingStream, getEventDispatcher()));
try {
translatingStream.close();
} catch (IOExceptionWrapper ioew) {
throw ioew.getOriginalException();
} catch (IOException e) {
SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.IO_ERROR, e.getMessage()), SVNLogType.WC);
}
} else {
repos.getFile("", revNumber, null, new SVNCancellableOutputStream(dst, getEventDispatcher()));
}
}
try {
dst.flush();
} catch (IOException e) {