Ich verwende SVNKIT, um Änderungen in SVN zu committen. es läuft gut wie erwartet in Java. Problem ist, dass Kommentare nicht in SVN gespeichert werden. ich tue etwas wie unten:SVN KIT commit comments Problem
String comment = "testing here";
ISVNEditor editor = repository.getCommitEditor(comment, null /*locks*/ , false /*keepLocks*/ , null /*mediator*/);
SVNCommitInfo commitInfo = modifyFile(editor, "", "filePath", contents, modifiedContents);
und modifyFile methos wie unter
private static SVNCommitInfo modifyFile(ISVNEditor editor, String dirPath,
String filePath, byte[] oldData, byte[] newData) throws SVNException {
editor.openRoot(-1);
editor.openDir(dirPath, -1);
editor.openFile(filePath, -1);
editor.applyTextDelta(filePath, null);
SVNDeltaGenerator deltaGenerator = new SVNDeltaGenerator();
String checksum = deltaGenerator.sendDelta(filePath, new ByteArrayInputStream(oldData), 0, new ByteArrayInputStream(newData), editor, true);
editor.closeFile(filePath, checksum);
editor.closeDir();
editor.closeDir();
return editor.closeEdit();
}
ich bin nicht in der Lage die Fehler, warum Kommentare zu finden sind, nicht gespeichert werden. maven Eintrag für die gleiche ist -
<groupId>org.tmatesoft.svnkit</groupId>
<artifactId>svnkit</artifactId>
<version>1.8.11</version>