如何使用SvnKit获取两个分支之间的日志?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何使用SvnKit获取两个分支之间的日志?相关的知识,希望对你有一定的参考价值。
我有像this这样的分支结构。如何使用SvnKit在不同分支中的两个修订版之间获取svn日志(例如,分支5A.1的修订版和分支2B.3的修订版),不包括已合并的修订版?我知道,如何使用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
。看看这个解决方案:
How to use SVNKit to get the list of all revisions merged from one branch to another?
以上是关于如何使用SvnKit获取两个分支之间的日志?的主要内容,如果未能解决你的问题,请参考以下文章