私はSVNKitドキュメンテーションのドキュメンテーションから書いた/修正したメソッドを手に入れようとしていますが、役に立たないものです。特定のリビジョンと一致するファイルの内容を出力しようとしています。問題は、getfile呼び出しを適切に使用する方法がわからないことです。私はそれに渡す必要がある文字列がわからないだけです。どんな助けでも大歓迎です!!問題が異なっている以前のリビジョンでの経路に関連することができるなぜこのgetFileのインスタンスはSVNKitで動作しますか?
public static void listEntries(SVNRepository repository, String path, int revision, List<S_File> file_list) throws SVNException {
Collection entries = repository.getDir(path, revision, null, (Collection) null);
Iterator iterator = entries.iterator();
while (iterator.hasNext()) {
SVNDirEntry entry = (SVNDirEntry) iterator.next();
if (entry.getRevision() == revision) {
SVNProperties fileProperties = new SVNProperties();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
S_File toadd = new S_File(entry.getDate(), entry.getName(), entry.getRevision());
try {
SVNNodeKind nodeKind = repository.checkPath(path + entry.getName(), revision); //**PROBLEM HERE**
if (nodeKind == SVNNodeKind.NONE) {
System.err.println("There is no entry there");
//System.exit(1);
} else if (nodeKind == SVNNodeKind.DIR) {
System.err.println("The entry is a directory while a file was expected.");
//System.exit(1);
}
repository.getFile(path + entry.getName(), revision, fileProperties, baos);
} catch (SVNException svne) {
System.err.println("error while fetching the file contents and properties: " + svne.getMessage());
//System.exit(1);
}