public class VCSSVN extends AbstractVCS
Modifier and Type | Class and Description |
---|---|
protected static class |
VCSSVN.ConnectionState
Connection state.
|
VCS.Status
Modifier and Type | Field and Description |
---|---|
protected VCSSVN.ConnectionState |
connectionState
Current connection state.
|
protected static org.apache.commons.logging.Log |
log
to use log facility, just put in your code: log.info(\"...\");
|
protected org.tmatesoft.svn.core.wc.SVNClientManager |
svnManager
Svn client manager instance.
|
host, listeners, localRepository, login, password, path, protocol, sshKeyFile, writeable
TYPE_CVS, TYPE_NONE, TYPE_SVN, VCS_HOST_NAME, VCS_PATH, VCS_PROTOCOL, VCS_TYPE, VCS_USER_NAME, VCS_USER_PASSWORD
Constructor and Description |
---|
VCSSVN(File localRepository,
String protocol,
String host,
String path,
File sshKeyFile,
String login,
String password)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(List<File> files,
String msg)
Perform :
- svn add
- commit
|
List<File> |
checkFileStatus()
Vérifie si tous les fichiers du repository local sont les dernieres
version par rapport au serveur.
|
void |
checkout(org.nuiton.util.version.Version tag,
boolean recurse)
get repository on server and put it in localdir.
|
void |
checkProtocol()
Verifie la connexion et si le protocole a change, switch le repository
pour utiliser le nouveau protocole.
|
void |
cleanup(File path)
Cleanup a directory, removing all lock.
|
void |
commit(List<File> files,
String msg)
Commit specified files, if files is null, all files are committed.
|
protected void |
commitWithoutCheck(List<File> files,
String msg)
Commit without ask for registred listeners.
|
void |
delete(List<File> files,
String msg)
Delete and commit files in server repository.
|
Map<File,String> |
getChanglog(List<File> files)
Return all changelog between local file version and remote repository
file version.
|
String |
getDiff(File file)
show diff between local file and repository file.
|
List<String> |
getFileList(File directory)
Return list of all file on directory on remote server.
|
VCS.Status |
getLocalStatus(File file)
Get file local status.
|
protected Map<File,org.tmatesoft.svn.core.wc.SVNStatus> |
getLocalStatus(File file,
boolean recurse,
org.tmatesoft.svn.core.wc.SVNStatusType... wanted)
Recherche le statut des fichiers locaux, ne retourne jamais les fichiers
NORMAL ou NONE sauf si demandé explicitement via wanted
|
String |
getRemoteRepository()
Retourne l'url du repository distant.
|
protected Map<File,org.tmatesoft.svn.core.wc.SVNStatus> |
getRemoteStatus(File file,
boolean recurse)
Retourne la liste des fichiers qui ont été mis à jour sur le serveur.
|
protected org.tmatesoft.svn.core.SVNURL |
getRemoteURL()
Retourne l'url dans un objet SVNURL (svnkit).
|
protected org.tmatesoft.svn.core.wc.SVNClientManager |
getSVNManager()
Return svnkit SVNManager.
|
String |
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"
|
List<File> |
getUpdatedFile()
get list of new or modified files on server.
|
boolean |
haveUpdate()
Ask if there are some new or modified files on server.
|
boolean |
isConnected()
Get connection state.
|
boolean |
isOnRemote(File file)
Check if file is available on server.
|
boolean |
isTag(org.nuiton.util.version.Version version)
Look on server if version is tag repository.
|
boolean |
isUpToDate(File file)
Check if file is uptodate.
|
boolean |
isValidLocalRepository()
Return true, if local repository is valid repository for actual vcs.
|
boolean |
isVersionnableFile(File file)
Check if file can be put in vcs repository.
|
boolean |
isWriteable()
Return true, if local repository is writable.
|
List<File> |
setTag(org.nuiton.util.version.Version version)
Change repository tag, used when we use some tag and we want to go to
trunk.
|
List<File> |
update(File file,
boolean recurse)
Update file.
|
accept, addVetoableActionListener, fireAction, getHost, getLocalRepository, getLogin, getPassword, getPath, getProtocol, getSshKeyFile, remoteVetoableActionListener, setHost, setLocalRepository, setLogin, setPassword, setPath, setProtocol, setSshKeyFile, setWriteable
protected static org.apache.commons.logging.Log log
protected org.tmatesoft.svn.core.wc.SVNClientManager svnManager
protected VCSSVN.ConnectionState connectionState
protected org.tmatesoft.svn.core.wc.SVNClientManager getSVNManager()
SVNClientManager
public boolean isValidLocalRepository()
public boolean isConnected()
public void checkProtocol() throws VCSException
VCSException
public List<File> checkFileStatus() throws VCSException
VCSException
protected org.tmatesoft.svn.core.SVNURL getRemoteURL() throws org.tmatesoft.svn.core.SVNException
org.tmatesoft.svn.core.SVNException
SVNURL
public String getRemoteRepository()
public boolean isVersionnableFile(File file)
VCS
default refused .svn, CVS and ~ filename Must be override, this default implementation return true.
isVersionnableFile
in interface VCS
isVersionnableFile
in class AbstractVCS
true
if file is versionnablepublic void cleanup(File path) throws VCSException
path
- path to cleanupVCSException
public void commit(List<File> files, String msg) throws VCSException
files
- files to commitmsg
- message used to commitVCSException
protected void commitWithoutCheck(List<File> files, String msg) throws VCSException
files
- files to commitmsg
- message for commitVCSException
public void add(List<File> files, String msg) throws VCSException
files
- list of file to addmsg
- message for commitVCSException
public void checkout(org.nuiton.util.version.Version tag, boolean recurse) throws VCSException
VCS
tag
- tag to used, null = /trunk other is tags/[tag]recurse
- if file is directory checkout sub fileVCSException
public void delete(List<File> files, String msg) throws VCSException
VCS
files
- file to deletemsg
- message for commitVCSException
public VCS.Status getLocalStatus(File file) throws VCSException
VCS
file
- file to get statusVCSException
protected Map<File,org.tmatesoft.svn.core.wc.SVNStatus> getLocalStatus(File file, boolean recurse, org.tmatesoft.svn.core.wc.SVNStatusType... wanted) throws VCSException
file
- le repertoire a partir duquel on souhaite le statusrecurse
- si l'on souhaite le faire recursivementwanted
- l'ensemble des status type que l'on recheche, si vide
recherche tous les statutsVCSException
protected Map<File,org.tmatesoft.svn.core.wc.SVNStatus> getRemoteStatus(File file, boolean recurse) throws VCSException
file
- recurse
- VCSException
public Map<File,String> getChanglog(List<File> files) throws VCSException
files
- VCSException
public String getDiff(File file) throws VCSException
file
- file to get diffVCSException
public List<String> getFileList(File directory) throws VCSException
VCS
VCSException
public List<File> getUpdatedFile() throws VCSException
VCSException
public boolean haveUpdate() throws VCSException
VCSException
public boolean isOnRemote(File file) throws VCSException
file
- file to checkVCSException
public boolean isUpToDate(File file) throws VCSException
file
- file to checkVCSException
public List<File> update(File file, boolean recurse) throws VCSException
VCS
file
- files to updateVCSException
public boolean isWriteable() throws VCSException
VCS
VCSException
public boolean isTag(org.nuiton.util.version.Version version) throws VCSException
VCS
version
- version number like 3.2VCSException
public String getTag() throws VCSException
VCS
VCSException
public List<File> setTag(org.nuiton.util.version.Version version) throws VCSException
VCS
version
- version to go, if null trunk is used, otherwize
tags/version is usedVCSException
Copyright © 1999–2020 CodeLutin. All rights reserved.