long number = repository.getLatestRevision(); if (revision == SVNRevision.PREVIOUS) { number--;
if (revision == SVNRevision.WORKING || revision == SVNRevision.BASE) { String revStr = wcAccess.getTargetEntryProperty(SVNProperty.REVISION); return revStr != null ? Long.parseLong(revStr) : -1; } else if (revision == SVNRevision.COMMITTED || revision == SVNRevision.PREVIOUS) { String revStr = wcAccess.getTargetEntryProperty(SVNProperty.COMMITTED_REVISION); long number = revStr != null ? Long.parseLong(revStr) : -1; if (revision == SVNRevision.PREVIOUS) { number--; } return number;
    protected long getRevisionNumber(String url, SVNRevision revision) throws SVNException {        if (revision.getNumber() >= 0) {            return revision.getNumber();        }        SVNRepository repository = myRepositoryFactory.createRepository(url);                    if (revision.getDate() != null) {            return repository.getDatedRevision(revision.getDate());        }        long number = repository.getLatestRevision();        if (revision == SVNRevision.PREVIOUS) {            number--;        }        return number;            }