[英]How to Get a Log Between Two Branches Using SvnKit?
我有一個分支結構像這樣 。 如何使用SvnKit在不同分支的兩個修訂之間(例如,分支5A.1的修訂和分支2B.3的修訂)獲取svn日志,但不包括已合並的修訂? 我知道,如何使用SvnLog操作在單個分支內執行此操作:
// factory - SvnOperationFactory instance
SvnLog svnLog = factory.createLog();
// target - SvnTarget instance, created from branch URL
// using SvnTarget.fromURL(SVNURL.parseURIEncoded(branchPath))
// my problem is there: how to tell svnLog that I need a diffrence
// between two different branches?
// Adding a second target won't solve my problem, I suppose
svnLog.addTarget(target);
// if you need to go deeper in history, set to "false"
// if you looking for revisions only inside this branch, set to "true"
svnLog.setStopOnCopy(stopOnCopy);
// if you need to include merged revisions too
svnLog.setUseMergeHistory(useMergeHistory);
SVNRevision startRev = SVNRevision.create(startRevNumber);
SVNRevision endRev = SVNRevision.create(startRevNumber);
svnLog.addRange(SvnRevisionRange.create(startRev, endRev));
// the limit of SvnLogEntry items
svnLog.setLimit(limit);
return svnLog.run(null);
我無法解決某些誤解。 SvnKit版本是1.8.7
您很可能應該使用SvnLogMergeInfo
。 查看以下解決方案:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.