public class RemoteRepositoryProvider
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REPO_GIT_SUBDIR |
static java.lang.String |
REPO_PREPARE_SUBDIR |
static java.lang.String |
REPO_SUBDIR |
static java.lang.String |
REPO_SVN_SUBDIR |
Constructor and Description |
---|
RemoteRepositoryProvider(java.io.File projectRoot,
java.util.List<RepositoryDefinition> repositoriesDefinitions) |
RemoteRepositoryProvider(java.io.File projectRoot,
java.util.List<RepositoryDefinition> repositoriesDefinitions,
ProjectProperties props) |
Modifier and Type | Method and Description |
---|---|
protected void |
addForCommit(IRemoteRepository2 repo,
java.lang.String path) |
protected void |
checkDefinitions()
Check repository definitions in the project.
|
void |
cleanPrepared() |
java.lang.String |
commitFileAfterVersion(java.lang.String path,
java.lang.String commentText,
java.lang.String... onVersions)
Commit specific file after rebase.
|
void |
commitFiles(java.lang.String path,
java.lang.String commentText)
Commit set of files without rebase - just local version.
|
protected void |
copyFile(java.io.File from,
java.io.File to,
java.lang.String eolConversionCharset) |
void |
copyFilesFromProjectToRepos(java.lang.String localPath,
java.lang.String eolConversionCharset)
Copy all mappings that under specified directory path into repository directory.
|
void |
copyFilesFromReposToProject(java.lang.String localPath)
Copies all files under specified path that are mapped to local directory.
|
protected java.util.List<org.omegat.core.team2.RemoteRepositoryProvider.Mapping> |
getMappings(java.lang.String path,
java.lang.String... forceExcludes)
Find mappings for specified path.
|
protected java.io.File |
getRepositoryDir(RepositoryDefinition repo) |
ProjectTeamSettings |
getTeamSettings() |
java.lang.String |
getVersion(java.lang.String file)
Get version of specified file.
|
protected void |
initializeRepositories()
Initialize repositories instances.
|
boolean |
isUnderMapping(java.lang.String path)
Checks if path is under mapping.
|
protected org.omegat.core.team2.RemoteRepositoryProvider.Mapping |
oneMapping(java.lang.String path)
Found mapping must be one.
|
void |
setForceExcludesFromProjectProperties(ProjectProperties props) |
void |
switchAllToLatest()
Switch all repositories into latest version.
|
java.io.File |
switchToVersion(java.lang.String filePath,
java.lang.String version)
Switch repository that contains path to specified version.
|
java.io.File |
toPrepared(java.io.File inFile)
Saves file into 'prepared' dir.
|
public static final java.lang.String REPO_SUBDIR
public static final java.lang.String REPO_PREPARE_SUBDIR
public static final java.lang.String REPO_GIT_SUBDIR
public static final java.lang.String REPO_SVN_SUBDIR
public RemoteRepositoryProvider(java.io.File projectRoot, java.util.List<RepositoryDefinition> repositoriesDefinitions, ProjectProperties props) throws java.lang.Exception
java.lang.Exception
public RemoteRepositoryProvider(java.io.File projectRoot, java.util.List<RepositoryDefinition> repositoriesDefinitions) throws java.lang.Exception
java.lang.Exception
public void setForceExcludesFromProjectProperties(ProjectProperties props)
public ProjectTeamSettings getTeamSettings()
protected void checkDefinitions()
protected void initializeRepositories() throws java.lang.Exception
java.lang.Exception
protected java.util.List<org.omegat.core.team2.RemoteRepositoryProvider.Mapping> getMappings(java.lang.String path, java.lang.String... forceExcludes)
protected org.omegat.core.team2.RemoteRepositoryProvider.Mapping oneMapping(java.lang.String path)
public boolean isUnderMapping(java.lang.String path)
public void cleanPrepared() throws java.io.IOException
java.io.IOException
public java.io.File toPrepared(java.io.File inFile) throws java.io.IOException
java.io.IOException
public void switchAllToLatest() throws java.lang.Exception
IRemoteRepository2.NetworkException
in which case it will throw immediately. If any other exceptions occur while updating
the repos, the first will be thrown after all repos have been processed.java.lang.Exception
public java.io.File switchToVersion(java.lang.String filePath, java.lang.String version) throws java.lang.Exception
java.lang.Exception
public java.lang.String commitFileAfterVersion(java.lang.String path, java.lang.String commentText, java.lang.String... onVersions) throws java.lang.Exception
java.lang.Exception
public void commitFiles(java.lang.String path, java.lang.String commentText) throws java.lang.Exception
java.lang.Exception
public void copyFilesFromReposToProject(java.lang.String localPath) throws java.io.IOException
localPath
- directory name or file namejava.io.IOException
public void copyFilesFromProjectToRepos(java.lang.String localPath, java.lang.String eolConversionCharset) throws java.lang.Exception
localPath
- directory name or file nameeolConversionCharset
- not null if EOL conversion required. EOL will be converted to repository-specific for
existing files, and to platform-specific for new filesjava.lang.Exception
public java.lang.String getVersion(java.lang.String file) throws java.lang.Exception
java.lang.Exception
protected void copyFile(java.io.File from, java.io.File to, java.lang.String eolConversionCharset) throws java.io.IOException
java.io.IOException
protected void addForCommit(IRemoteRepository2 repo, java.lang.String path) throws java.lang.Exception
java.lang.Exception
protected java.io.File getRepositoryDir(RepositoryDefinition repo)