0

I trying to get the revision which a branch was created from using svnkit but I don't know how to achieve that. That I need is something like that the command line in this question.

If you have an example code to do this with svnkit, it will be very useful for me.

thanks!

mtsrvs
  • 11
  • 1
  • 5

1 Answers1

1

I FOUND THE SOLUTION

This code fragment is posting on this site. This code returns the revision which a branch was created from.

final long[] revStart = { -1 }; 

logClient.doLog(SVNURL.parseURIEncoded(
"https://svn.svnkit.com/repos/svnkit/branches/1.2.x"), 
null, SVNRevision.HEAD, SVNRevision.HEAD, SVNRevision.create(1), true, 
false, false, 0, null, new ISVNLogEntryHandler() { 
public void handleLogEntry(SVNLogEntry logEntry) throws 
    SVNException {
       System.out.println(logEntry);
       revStart[0] = logEntry.getRevision();
    }
}); 

System.out.println(revStart[0]); 
mtsrvs
  • 11
  • 1
  • 5