我正在尝试使用 SVNKit 从 SVN 存储库中获取日志。
public static void svnLogTest() {
final SvnOperationFactory svnOperationFactory = new SvnOperationFactory();
final SvnLog log = svnOperationFactory.createLog();
SVNURL url = null;
try {
url = SVNURL
.parseURIEncoded("https://svn-repo");
} catch (SVNException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
log.setSingleTarget(SvnTarget.fromURL(url));
log.addRange(SvnRevisionRange.create(SVNRevision.create(111),
SVNRevision.create(222)));
log.getRevisionRanges();
SVNLogEntry logEntry = null;
try {
logEntry = log.run();
System.out.println(logEntry.getAuthor() + " " + logEntry.getRevision() + " "
+ logEntry.getDate());
} catch (SVNException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
但它只会给我第一次修订,我应该如何迭代打印特定日期范围的日志?