Hello,
SVNRevision.PREVIOUS makes no sense for doCheckout method - there is no
revision number to base upon at the moment of checkout. If you'd like to
check out revision HEAD-1, then you may get HEAD revision first:
SVNInfo info = SVNWCClient.doInfo(URL, SVNRevision.HEAD, SVNRevision.HEAD);
SVNRevision latestRev = info.getRevision();
SVNRevision previous;
if (latestRev.getNumber() > 0) {
previous = SVNRevision.create(latestRev.getNumber() - 1);
} else {
previous = latestRev; // in case latest repo revision is 0.
}
Then call doCheckout with "previous" revision.
Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
Tech Cool wrote:
> Hello Group,
> I am facing problem to check out previous revision. I am
> using following API method and it gives error
>
> updateClient.doCheckout(url, destPath, SVNRevision.PREVIOUS , PREVIOUS ,
> isRecursive);
>
> regards,
> TechCool
>