Package org.omegat.core.team2.impl
Class SVNRemoteRepository2
java.lang.Object
org.omegat.core.team2.impl.SVNRemoteRepository2
- All Implemented Interfaces:
IRemoteRepository2
SVN repository connection implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.omegat.core.team2.IRemoteRepository2
IRemoteRepository2.BadRepositoryException, IRemoteRepository2.NetworkException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddForCommit(String path) Add the specified file in preparation for commit (e.g.voidaddForDeletion(String path) remove the specified file in preparation for commit (e.g.Commit to repository after specified version, or after any version if 'null' specified.getFileVersion(String file) Get file version.Return directory where this repo is in.String[]Returns a list of files or directories (empty or not) that have been deleted since the last call to this function, relative to the repository root that has been checked out.voidinit(RepositoryDefinition repo, File dir, ProjectTeamSettings teamSettings) Initialize repository provider.static booleanisSVNRepository(String url) Determines whether or not the supplied URL represents a valid Subversion repository.static voidvoidswitchToVersion(String version) static voidPlugin unloader.
-
Constructor Details
-
SVNRemoteRepository2
public SVNRemoteRepository2()Constructor of SVN remote repository.
-
-
Method Details
-
loadPlugins
public static void loadPlugins() -
unloadPlugins
public static void unloadPlugins()Plugin unloader. -
init
public void init(RepositoryDefinition repo, File dir, ProjectTeamSettings teamSettings) throws Exception Description copied from interface:IRemoteRepository2Initialize repository provider.- Specified by:
initin interfaceIRemoteRepository2- Parameters:
repo- repository description instancedir- directory for store filesteamSettings- team settings object for project- Throws:
Exception
-
getFileVersion
Description copied from interface:IRemoteRepository2Get file version.- Specified by:
getFileVersionin interfaceIRemoteRepository2- Throws:
Exception
-
switchToVersion
- Specified by:
switchToVersionin interfaceIRemoteRepository2- Throws:
Exception
-
addForCommit
Description copied from interface:IRemoteRepository2Add the specified file in preparation for commit (e.g.git add,svn add).- Specified by:
addForCommitin interfaceIRemoteRepository2- Parameters:
path- The relative path of the item from the root of the repo (should not start with a/)- Throws:
Exception- if error occurred
-
addForDeletion
Description copied from interface:IRemoteRepository2remove the specified file in preparation for commit (e.g.git rm,svn delete).- Specified by:
addForDeletionin interfaceIRemoteRepository2- Parameters:
path- The relative path of the item from the root of the repo (should not start with a/)- Throws:
Exception- if error occurred
-
getLocalDirectory
Description copied from interface:IRemoteRepository2Return directory where this repo is in.- Specified by:
getLocalDirectoryin interfaceIRemoteRepository2- Returns:
- The directory, e.g. /path/to/omegatdir/.repositories/https_site.com_myproject.git
-
getRecentlyDeletedFiles
Description copied from interface:IRemoteRepository2Returns a list of files or directories (empty or not) that have been deleted since the last call to this function, relative to the repository root that has been checked out. If this function is called for the first time, it returns the empty list.- Specified by:
getRecentlyDeletedFilesin interfaceIRemoteRepository2- Returns:
- An array of relative paths of deleted files.
- Throws:
Exception- If an error occurs.
-
commit
Description copied from interface:IRemoteRepository2Commit to repository after specified version, or after any version if 'null' specified.- Specified by:
commitin interfaceIRemoteRepository2- Parameters:
onVersions- if version defined, then commit must be just after this version. Otherwise(if remote repository was updated after rebase), commit shouldn't be processed and should return null. If version is null, then commit can be after any version, i.e. previous version shouldn't be checked. It can be several versions defined since glossary will be committed after project_save.tmx.comment- comment for commit- Returns:
- new version if commit was processed, or null if remote repository was updated by other user
- Throws:
Exception
-
isSVNRepository
Determines whether or not the supplied URL represents a valid Subversion repository.Does the equivalent of
svn info url.- Parameters:
url- URL of supposed remote repository- Returns:
- true if repository appears to be valid, false otherwise
-