Package fr.ifremer.isisfish.vcs
Interface VCS
- All Superinterfaces:
FileFilter
- All Known Implementing Classes:
AbstractVCS,VCSNone,VCSSVN
Version control system.
- Version:
- $Revision$ Last update : $Date$ By : $Author$
- Author:
- poussin
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringCVS VCS Typestatic final StringNone CVS Typestatic final StringSVN VCS Typestatic final Stringremote server adresse (ip or serveur name) ex: svn.forge.codelutin.comstatic final Stringremote repository path ex: /svnroot/isis-fish-datastatic final Stringcan be http, ssh, pserver, ...static final Stringcan be None, CVS or SVN.static final Stringuser login to access vcs ex: bpoussinstatic final Stringuser passwd or passphrase (protocol dependent) to access vcs ex: xxxxxxxx -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd and commit file in server repository.voidAjout un listener pouvant interdire les actions du vcsVerifie si tous les fichiers du repository local sont les dernieres version par rapport au serveur.voidcheckout(org.nuiton.version.Version tag, boolean recurse) get repository on server and put it in localdir.voidVerifie la connexion et si le protocole a change, switch le repository pour utiliser le nouveau protocole.voidCleanup a directory, removing all lock.voidCommit specified files, if files is null, all files are committed.voidDelete and commit files in server repository.getChanglog(List<File> files) Return all changelog between local file version and remote repository file version.show diff between local file and repository file.getFileList(File directory) Return list of all file on directory on remote server.getHost()Get host.Get local repository directorygetLocalStatus(File file) Get file local status.getLogin()Get login.Get password.getPath()Get repository path.Get protocol.Get ssh key file.getTag()Retourne le tag reellement utilise, par exemple si on a fait un setTag(3.2.0) cette methode retourne "/tags/3.2.0", pour setTag(null) on retourne "/trunk"get list of new or modified files on server.booleanAsk if there are some new or modified files on server.booleanGet connection state.booleanisOnRemote(File file) Check if file is available on server.booleanisTag(org.nuiton.version.Version version) Look on server if version is tag repository.booleanisUpToDate(File file) Check if file is up-to-date.booleanReturn true, if local repository is valid repository for actual vcs.booleanisVersionnableFile(File file) Check if file can be put in vcs repository.booleanReturn true, if local repository is writable.voidSupprime un listener pouvant interdire les actions du vcsvoidChange host.voidChange login.voidsetPassword(String password) Change password.voidChange path.voidsetProtocol(String protocol) Change protocol.voidsetSshKeyFile(File sshKeyFile) Change ssk key file to use.setTag(org.nuiton.version.Version version) Change repository tag, used when we use some tag and we want to go to trunk.voidsetWriteable(boolean value) Permit to force repository to read-only if value is false, otherwise use normal rules.Update file.Methods inherited from interface java.io.FileFilter
accept
-
Field Details
-
TYPE_CVS
CVS VCS Type- See Also:
-
TYPE_NONE
None CVS Type- See Also:
-
TYPE_SVN
SVN VCS Type- See Also:
-
VCS_TYPE
can be None, CVS or SVN. only None or SVN work- See Also:
-
VCS_PROTOCOL
can be http, ssh, pserver, ...- See Also:
-
VCS_HOST_NAME
remote server adresse (ip or serveur name) ex: svn.forge.codelutin.com- See Also:
-
VCS_PATH
remote repository path ex: /svnroot/isis-fish-data- See Also:
-
VCS_USER_NAME
user login to access vcs ex: bpoussin- See Also:
-
VCS_USER_PASSWORD
user passwd or passphrase (protocol dependent) to access vcs ex: xxxxxxxx- See Also:
-
-
Method Details
-
addVetoableActionListener
Ajout un listener pouvant interdire les actions du vcs- Parameters:
l- listener to add
-
remoteVetoableActionListener
Supprime un listener pouvant interdire les actions du vcs- Parameters:
l- listener to remove
-
getLocalRepository
File getLocalRepository()Get local repository directory- Returns:
- local repository
-
isValidLocalRepository
boolean isValidLocalRepository()Return true, if local repository is valid repository for actual vcs.- Returns:
- validity
-
isWriteable
Return true, if local repository is writable. (use trunk and is not anonymous)- Returns:
- writable
- Throws:
VCSException
-
setWriteable
void setWriteable(boolean value) Permit to force repository to read-only if value is false, otherwise use normal rules.- Parameters:
value- writable
-
cleanup
Cleanup a directory, removing all lock.- Parameters:
path- path to cleanup- Throws:
VCSException
-
commit
Commit specified files, if files is null, all files are committed.- Parameters:
files- files to commitmsg- message used to commit- Throws:
VCSException
-
add
Add and commit file in server repository.- Parameters:
files- list of file to addmsg- message for commit- Throws:
VCSException
-
checkout
get repository on server and put it in localdir.- Parameters:
tag- tag to used, null = /trunk other is tags/[tag]recurse- if file is directory checkout sub file- Throws:
VCSException
-
delete
Delete and commit files in server repository.- Parameters:
files- file to deletemsg- message for commit- Throws:
VCSException
-
getChanglog
Return all changelog between local file version and remote repository file version.- Parameters:
files-- Returns:
- changelog for each file
- Throws:
VCSException
-
getDiff
show diff between local file and repository file.- Parameters:
file- file to get diff- Returns:
- string diff
- Throws:
VCSException
-
getLocalStatus
Get file local status.- Parameters:
file- file to get status- Returns:
- file status
- Throws:
VCSException
-
getFileList
Return list of all file on directory on remote server.- Parameters:
directory-- Returns:
- files list
- Throws:
VCSException
-
getUpdatedFile
get list of new or modified files on server.- Returns:
- list of modified or new files
- Throws:
VCSException
-
haveUpdate
Ask if there are some new or modified files on server.- Returns:
- true if new file available
- Throws:
VCSException
-
isConnected
boolean isConnected()Get connection state.- Returns:
- true if server is connected
-
isOnRemote
Check if file is available on server.- Parameters:
file- file to check- Returns:
- true if file available
- Throws:
VCSException
-
isTag
Look on server if version is tag repository.- Parameters:
version- version number like 3.2- Returns:
- true if tag found with this name
- Throws:
VCSException
-
isUpToDate
Check if file is up-to-date.- Parameters:
file- file to check- Returns:
- true if file is in last version
- Throws:
VCSException
-
isVersionnableFile
Check if file can be put in vcs repository. For example when you used CVS, you must not put CVS file.default refused .svn, CVS and ~ filename Must be override, this default implementation return true.
- Parameters:
file-- Returns:
trueif file is versionnable
-
update
Update file.- Parameters:
file- files to updaterecurse-- Returns:
- true if there are some merging conflict, false otherwise
- Throws:
VCSException
-
checkProtocol
Verifie la connexion et si le protocole a change, switch le repository pour utiliser le nouveau protocole. Si on est en mode interface (mode graphique) et que le switch se passe mal, demande a l'utilisateur de nouvelle valeur pour le protocole (+ identifiant, ...)- Throws:
VCSException
-
checkFileStatus
Verifie si tous les fichiers du repository local sont les dernieres version par rapport au serveur. Si ce n'est pas le cas et que l'on est en mode interactif (mode graphique), on lui propose de mettre a jour les fichiers, avec la possibilite de voir les changements sur les fichiers- Returns:
- list of file with unresolved conflict
- Throws:
VCSException
-
getHost
String getHost()Get host.- Returns:
- host
-
getLogin
String getLogin()Get login.- Returns:
- login
-
getPassword
String getPassword()Get password.- Returns:
- password
-
getPath
String getPath()Get repository path.- Returns:
- path
-
getProtocol
String getProtocol()Get protocol.- Returns:
- protocol
-
getSshKeyFile
File getSshKeyFile()Get ssh key file.- Returns:
- ssh key file
-
getTag
Retourne le tag reellement utilise, par exemple si on a fait un setTag(3.2.0) cette methode retourne "/tags/3.2.0", pour setTag(null) on retourne "/trunk"- Returns:
- tag
- Throws:
VCSException
-
setTag
Change repository tag, used when we use some tag and we want to go to trunk.- Parameters:
version- version to go, if null trunk is used, otherwize tags/version is used- Returns:
- a list of all file in conflict
- Throws:
VCSException
-
setHost
Change host. checkProtocol is automaticaly done- Parameters:
host- new host.- Throws:
VCSException
-
setLogin
Change login. checkProtocol is automaticaly done- Parameters:
login- new login- Throws:
VCSException
-
setPassword
Change password.- Parameters:
password- password
-
setPath
Change path. checkPath is automaticaly done- Parameters:
path- new path- Throws:
VCSException
-
setProtocol
Change protocol. checkProtocol is automaticaly done- Parameters:
protocol-- Throws:
VCSException
-
setSshKeyFile
Change ssk key file to use.- Parameters:
sshKeyFile- new ssh kay file
-