if (entry.getCommittedRevision() < 0) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_BAD_REVISION, "Path ''{0}'' has no committed revision", path); SVNErrorManager.error(err); }
    protected long getRevisionNumber(SVNRevision revision, SVNRepository repository, File path) throws SVNException {        if (repository == null && (revision == SVNRevision.HEAD || revision.getDate() != null)) {            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_RA_ACCESS_REQUIRED);            SVNErrorManager.error(err);        }        if (revision.getNumber() >= 0) {            return revision.getNumber();        } else if (revision.getDate() != null) {            return repository.getDatedRevision(revision.getDate());        } else if (revision == SVNRevision.HEAD) {            return repository.getLatestRevision();        } else if (!revision.isValid()) {            return -1;        } else if (revision == SVNRevision.COMMITTED || revision == SVNRevision.WORKING ||                 revision == SVNRevision.BASE || revision == SVNRevision.PREVIOUS) {            if (path == null) {                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_VERSIONED_PATH_REQUIRED);                SVNErrorManager.error(err);            }            SVNWCAccess wcAccess = createWCAccess(path);            SVNEntry entry = wcAccess.getTargetEntry();            if (entry == null) {                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNVERSIONED_RESOURCE, "''{0}'' is not unvderversion control", path);                SVNErrorManager.error(err);            }            if (revision == SVNRevision.WORKING || revision == SVNRevision.BASE) {                return entry.getRevision();            }            return revision == SVNRevision.PREVIOUS ? entry.getCommittedRevision() - 1 : entry.getCommittedRevision();                    } else {            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_BAD_REVISION, "Unrecognized revision type requested for ''{0}''", path != null ? path : (Object) repository.getLocation());            SVNErrorManager.error(err);        }        return -1;    }