SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_NOT_FOUND, "''{0}'' is not under version control", wcAccess.getAnchor().getFile(name));
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_NOT_FOUND, "''{0}'' is not under version control or doesn''t exist", path, SVNErrorMessage.TYPE_WARNING);
    public void doGetFileContents(File path, SVNRevision pegRevision,            SVNRevision revision, boolean expandKeywords, OutputStream dst)            throws SVNException {        if (dst == null) {            return;        }        if (revision == null || !revision.isValid()) {            revision = SVNRevision.WORKING;        }        if (revision == SVNRevision.COMMITTED) {            revision = SVNRevision.BASE;        }        SVNWCAccess wcAccess = createWCAccess(path);        if ("".equals(wcAccess.getTargetName()) || wcAccess.getTarget() != wcAccess.getAnchor()) {            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_IS_DIRECTORY, "''{0}'' refers to a directory", path, SVNErrorMessage.TYPE_WARNING);            SVNErrorManager.error(err);        }        String name = wcAccess.getTargetName();        if (revision == SVNRevision.WORKING || revision == SVNRevision.BASE) {            File file = wcAccess.getAnchor().getBaseFile(name, false);            boolean delete = false;            SVNEntry entry = wcAccess.getAnchor().getEntries().getEntry(wcAccess.getTargetName(), false);            if (entry == null) {                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_NOT_FOUND, "''{0}'' is not under version control", wcAccess.getAnchor().getFile(name));                SVNErrorManager.error(err);            }            try {                if (revision == SVNRevision.BASE) {                    if (expandKeywords) {                        delete = true;                        file = wcAccess.getAnchor().getBaseFile(name, true).getParentFile();                        file = SVNFileUtil.createUniqueFile(file, name, ".tmp");                        SVNTranslator.translate(wcAccess.getAnchor(), name,                                SVNFileUtil.getBasePath(wcAccess.getAnchor().getBaseFile(name, false)),                                 SVNFileUtil.getBasePath(file), true, false);                    }                } else {                    if (!expandKeywords) {                        delete = true;                        file = wcAccess.getAnchor().getBaseFile(name, true).getParentFile();                        file = SVNFileUtil.createUniqueFile(file, name, ".tmp");                        SVNTranslator.translate(wcAccess.getAnchor(), name,                                name, SVNFileUtil.getBasePath(file), false,                                false);                    } else {                        file = wcAccess.getAnchor().getFile(name);                    }                }            } finally {                if (file != null && file.exists()) {                    InputStream is = SVNFileUtil.openFileForReading(file);                    try {                        int r;                        while ((r = is.read()) >= 0) {                            dst.write(r);                        }                    } catch (IOException e) {                        SVNDebugLog.logInfo(e);                    } finally {                        SVNFileUtil.closeFile(is);                        if (delete) {                            file.delete();                        }                    }                }            }        } else {            SVNRepository repos = createRepository(null, path, pegRevision, revision);            long revNumber = getRevisionNumber(revision, repos, path);            if (!expandKeywords) {                repos.getFile("", revNumber, null, dst);            } else {                String adminDir = SVNFileUtil.getAdminDirectoryName();                File tmpFile = SVNFileUtil.createUniqueFile(new File(path.getParentFile(), adminDir + "/tmp/text-base"), path.getName(), ".tmp");                File tmpFile2 = null;                OutputStream os = null;                InputStream is = null;                try {                    os = SVNFileUtil.openFileForWriting(tmpFile);                    Map properties = new HashMap();                    repos.getFile("", revNumber, properties, os);                    SVNFileUtil.closeFile(os);                    os = null;                    String keywords = (String) properties.get(SVNProperty.KEYWORDS);                    String eol = (String) properties.get(SVNProperty.EOL_STYLE);                    byte[] eolBytes = SVNTranslator.getWorkingEOL(eol);                    Map keywordsMap = SVNTranslator.computeKeywords(keywords, repos.getLocation().toString(),                            (String) properties.get(SVNProperty.LAST_AUTHOR),                            (String) properties.get(SVNProperty.COMMITTED_DATE),                            (String) properties.get(SVNProperty.COMMITTED_REVISION));                    tmpFile2 = SVNFileUtil.createUniqueFile(new File(path.getParentFile(), adminDir + "/tmp/text-base"), path.getName(), ".tmp");                    SVNTranslator.translate(tmpFile, tmpFile2, eolBytes, keywordsMap, false, true);                    // cat tmp file                    is = SVNFileUtil.openFileForReading(tmpFile2);                    int r;                    while ((r = is.read()) >= 0) {                        dst.write(r);                    }                } catch (IOException e) {                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, e.getLocalizedMessage());                    SVNErrorManager.error(err, e);                } finally {                    SVNFileUtil.closeFile(os);                    SVNFileUtil.closeFile(is);                    if (tmpFile != null) {                        tmpFile.delete();                    }                    if (tmpFile2 != null) {                        tmpFile2.delete();                    }                }            }        }    }