Question

Using SVNKit I am able to browse through the revision history for an SVN branch. I want to identify in which of these revisions a merge was performed.

I have looked at org.tmatesoft.svn.core.SVNLogEntry documentation and cannot find anything from it. Is there any other API's which can be used here?

Following is the code snippet which I am using to get revisions

SVNRepositoryrepository = SVNRepositoryFactory.create(svnURL);
Collection<SVNLogEntry> entries = repository.log(new String[] { "" }, null, startRevision, endRevision, true, false);

This gives me all revision between start and end revision, now how can I identify which of the above revisions are the ones in which a merge was performed.

Était-ce utile?

La solution 2

SVNLogEntry.hasChildren() worked for me. one might need to change the way in which repository.log API is used to get the additional information required for this API to provide correct result.

Autres conseils

I'm trying to figure out the same thing. Here's what I have found so far: SVNDiffClient.doGetMergedMergeInfo() takes a path and a revision as parameters and returns mergeinfo for any merges that occurred on the path before the revision you specified. In terms of finding out which revisions were the merges you can try it for each rev in order and see where the merge info shows up.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top