Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svnkit: how to get working copy revision number?

Tags:

I am using SVNKit 1.3.2 and trying to obtain working copy revision number.

Working copy is checkouted also with SVNKit, but when I'm trying to call

clientManager.getLookClient().doGetYoungestRevision(destination);

I got FileNotFoundException telling me that 'format' file is not found under destination path, ex /path/to/working/copy/format

I can see 2 troubles: - It tries to access 'format' file right in working directory root, while this file supposed to be in .svn folder

  • There is not file in this .svn folder.

Any clues? Thank you!

like image 926
glaz666 Avatar asked Feb 19 '10 09:02

glaz666


1 Answers

Seems to be it should be done through SVNStatusClient:

clientManager.getStatusClient().doStatus(destination, false).getRevision().getNumber();

Though still don't understand what's the problem with doGetYoungestRevision(destination)...

like image 125
glaz666 Avatar answered Nov 15 '22 11:11

glaz666