tags:

views:

112

answers:

1

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 start revision as SVNRevision.START and the end revision as SVNRevision.HEAD

Interestingly enough, the cmd line client has the same problem:

$ svn log --revision START:HEAD fileName 
svn: Syntax error in revision argument 'START:HEAD'

Yet the following works, although you don't seem to be able 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
------------------------------------------------------------------------
A: 

I found this approach in the test code in: 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);

That does the trick!

Langley