Is it possible in SVN 1.6 to track where a commit was merged. I'm especially interesting in UI based solution (Eclipse plugin will be great).
Thank you for all answered person (special thanks to derobert and Jim T). I write my own code using svnkit 1.2.x that do what I exactly need.
private static void showMergedRevision(String pFromUrl, String pToUrl) throws SVNException {
List<String> folders= new ArrayList<String>();
folders.add("Folder1");
...
SVNRepositoryFactoryImpl.setup();
String name="user";
String password="password";
ISVNOptions options = SVNWCUtil.createDefaultOptions( true );
ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(name, password);
SVNClientManager ourClientManager = SVNClientManager.newInstance( options , authManager );
final Set<Long> mergedRevision = new HashSet<Long>();
for(String folder : folders){
SVNURL svnFrom = SVNURL.parseURIDecoded(pFromUrl + "/" + folder);
SVNURL svnTo = SVNURL.parseURIDecoded(pToUrl+ "/" + folder);
ISVNLogEntryHandler mergedLogger = new ISVNLogEntryHandler() {
public void handleLogEntry(SVNLogEntry pParamSVNLogEntry) throws SVNException {
mergedRevision.add(pParamSVNLogEntry.getRevision());
}
};
ourClientManager.getDiffClient().doGetLogMergedMergeInfo(svnTo, SVNRevision.HEAD, svnFrom, SVNRevision.HEAD, false, null, mergedLogger);
}
System.out.println(String.format("Tracking merges from [%s] to [%s].", pFromUrl, pToUrl));
System.out.println("Comparing folders: " + folders);
SVNURL svnUrlorg = SVNURL.parseURIDecoded(pFromUrl);
ISVNLogEntryHandler histroyLogger= new ISVNLogEntryHandler() {
public void handleLogEntry(SVNLogEntry pParamSVNLogEntry) throws SVNException {
if (pParamSVNLogEntry.getRevision() < 0){
// Sometimes got -1 null null null values. Skip them
return;
}
final boolean merged = mergedRevision.contains(pParamSVNLogEntry.getRevision());
System.out.println(String.format("%s %s: %s %s %s", merged ? "[+]": "[-]",
pParamSVNLogEntry.getRevision(),
pParamSVNLogEntry.getAuthor(), pParamSVNLogEntry.getDate(),
pParamSVNLogEntry.getMessage()));
}
};
ourClientManager.getLogClient().doLog(svnUrlorg, null, SVNRevision.HEAD, SVNRevision.create(0), SVNRevision.HEAD, true, false, false, -1, null, histroyLogger);
}
The output will be:
[-] 7210: boa 03.07.2009
[-] 7211: boa 03.07.2009
[+] 7215: boa 03.07.2009
[+] means merged revision, [-] - unmerged.