Search in sources :

Example 1 with ProjectTeamSettings

use of org.omegat.core.team2.ProjectTeamSettings in project omegat by omegat-org.

the class ConvertProject26to37team method saveVersion.

/**
 * Save version of project_save.tmx to .repositories/versions.properties.
 */
private static void saveVersion(File projectRootFolder, String file, String version) throws IOException {
    ProjectTeamSettings teamSettings = new ProjectTeamSettings(new File(projectRootFolder, RemoteRepositoryProvider.REPO_SUBDIR));
    teamSettings.set(RebaseAndCommit.VERSION_PREFIX + file, version);
}
Also used : ProjectTeamSettings(org.omegat.core.team2.ProjectTeamSettings) File(java.io.File)

Example 2 with ProjectTeamSettings

use of org.omegat.core.team2.ProjectTeamSettings 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());
}
Also used : Path(java.nio.file.Path) SVNRemoteRepository2(org.omegat.core.team2.impl.SVNRemoteRepository2) RepositoryDefinition(gen.core.project.RepositoryDefinition) File(java.io.File)

Aggregations

File (java.io.File)2 RepositoryDefinition (gen.core.project.RepositoryDefinition)1 Path (java.nio.file.Path)1 ProjectTeamSettings (org.omegat.core.team2.ProjectTeamSettings)1 SVNRemoteRepository2 (org.omegat.core.team2.impl.SVNRemoteRepository2)1