I need to get the current revision of a local working copy.
So far I've come up with this: (EDITED)
private static long resolve(File workingDirectory) throws SVNException {
SvnOperationFactory svnOpFactory = new SvnOperationFactory();
SvnGetStatus svnGetStatus = svnOpFactory.createGetStatus();
svnGetStatus.setSingleTarget(SvnTarget.fromFile(workingDirectory));
svnGetStatus.setDepth(SVNDepth.EMPTY);
SvnStatus status = svnGetStatus.run();
return status.getRevision();
}
I can't find a place to actually specify the location of my working copy, not even in the documentation.
How can I tell SvnGetStatus where to look for the working copy?
Try setting it as the target of the operation: