use of org.omegat.core.team2.impl.SVNRemoteRepository2 in project omegat by omegat-org.
the class SVNRemoteRepository2IT method prepareFilesInLocalRepository.
private void prepareFilesInLocalRepository(String url) throws Exception {
Path tempSVNClientDir = Files.createTempDirectory("omegat-team-svnc");
SVNRemoteRepository2 rr2 = new SVNRemoteRepository2();
RepositoryDefinition repositoryDefinition = new RepositoryDefinition();
repositoryDefinition.setType("SVN");
repositoryDefinition.setUrl(url);
ProjectTeamSettings projectTeamSettings = new ProjectTeamSettings(tempSVNClientDir.toFile());
File svnCheckoutDir = new File(tempSVNClientDir.toFile(), "mysvnrepo");
rr2.init(repositoryDefinition, svnCheckoutDir, projectTeamSettings);
rr2.switchToVersion(null);
String newFile = createFileInSubdir(svnCheckoutDir, "asubrepo");
rr2.addForCommit(newFile);
rr2.commit(null, "init");
FileUtils.deleteDirectory(tempSVNClientDir.toFile());
}
Aggregations