How to use svnClientAdapter java API getLogMessages (java.io.File path, SVNRevision revisionStart, SVNRevision revisionEnd)
I just want to get all the log messages for a given resource in the repository.
However, given this particular API, I get errors if I try to specify the initial revision as SVNRevision.START and the final revision as SVNRevision.HEAD
Interestingly, the client of the cmd line has the same problem:
$ svn log --revision START:HEAD fileName
svn: Syntax error in revision argument 'START:HEAD'
However the following works, although you can't seem to specify it with the java api.
$ svn log --revision 0:HEAD fileName
------------------------------------------------------------------------
r863 | (no author) | 2009-10-09 11:42:09 -0400 (Fri, 09 Oct 2009) | 1 line
add
------------------------------------------------------------------------
r865 | (no author) | 2009-10-09 11:42:12 -0400 (Fri, 09 Oct 2009) | 1 line
update
------------------------------------------------------------------------
r866 | (no author) | 2009-10-09 11:42:14 -0400 (Fri, 09 Oct 2009) | 1 line
update
------------------------------------------------------------------------
+2
source to share
1 answer
I found this approach in test code at: org.tigris.subversion.svnclientadapter.basictests.LogTest
SVNRevision start = new SVNRevision.Number(1);
SVNRevision end = SVNRevision.HEAD;
history = svnClient.getLogMessages(new File(workingDirectoryFileUrl + location), start, end);
This is a trick!
0
source to share