0

我正在使用 JavaHL 连接到 1.6 svn 存储库。虽然我设法列出了存储库的内容,但我无法获取项目历史记录(签入时的评论以及日期和作者)。

据我所知, SVNClient.logMessages 是正确的方法,但从未执行过回调方法。我使用 Revision.HEAD 作为路径修订和一个修订范围对象,其中包含 Revision.START 和 Revision.HEAD;限制设置为 0(根据文档没有限制)。我正在尝试获取修订、日期、作者和评论。

如果有人知道有关使用 JavaHL 的示例代码,我也许可以通过将该代码与我的代码进行比较来找出我的错误。

BTW:我知道 SVNKit,但管理层决定不买它。因此,我必须使用 JavaHL,其中几乎不存在示例程序(并且文档将仅列出类和接口而没有非常详细的描述)。所以,请指出 SVNKit 的方向,因为这对我来说是不可能的。

任何指针表示赞赏。

纳尔夫

4

1 回答 1

0

The issue has been solved. The problem was the call to SVNClient.logMessages(), especially the revision range used.

The start revision had been Revision.START that, according to the documentation, is used to describe the "first existing revision".

The problem disappeared when I used Revision.getInstance(1) instead. As it is reasonable that any item has at least one revision (the initial one) with that number, it should be save to use that.

Hopefully this will save anyone else from spending another two-and-a-half days to figure it out!

Gnarf

于 2011-05-04T14:38:10.223 回答