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);
}
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());
}
Aggregations