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!
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]);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.