TMate Software, , , . , , Subversion, ( -) Subversion , , , Subversion .
, , , . , . , SVNDirEntry , , ; .
SVNDirEntry dirEntry = svnRepository.info(filePath, -1);
ISVNEditor editor = svnRepository.getCommitEditor("example modification", null, true, null);
editor.openRoot(-1);
if(dirEntry.getKind() == SVNNodeKind.NONE)
{
editor.addFile(filePath, null, -1);
}
else
{
editor.openFile(filePath, -1);
}
editor.applyTextDelta(filePath, null);
final SVNDeltaGenerator deltaGenerator = new SVNDeltaGenerator();
final String checksum = deltaGenerator.sendDelta(filePath, inputStream, editor, true);
editor.closeFile(filePath, checksum);
editor.closeDir();
editor.closeEdit();
, closeEdit() try...catch , , - .
, , SVNKIt 1.3.7 (, Maven):
<repositories>
<repository>
<id>svnkit-repository</id>
<name>SVNKit Repository</name>
<url>http://maven.tmatesoft.com/content/repositories/releases/</url>
</repository>
</repositories>
...
<dependency>
<groupId>org.tmatesoft.svnkit</groupId>
<artifactId>svnkit</artifactId>
<version>1.3.7</version>
</dependency>