Class AbstractSvnScmProvider
java.lang.Object
org.apache.maven.scm.provider.AbstractScmProvider
org.apache.maven.scm.provider.svn.AbstractSvnScmProvider
- All Implemented Interfaces:
ScmProvider
- Direct Known Subclasses:
SvnExeScmProvider
SCM Provider for Subversion.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class AbstractScmProvider
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) TODO: why public? This should be protected, no?protected BlameScmResultblame(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) protected BranchScmResultbranch(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) changelog(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) private booleancheckin(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) checkout(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) diff(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) protected ScmResultexecuteCommand(SvnCommand command, ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) protected ExportScmResultexport(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) private StringfindUrlInfoItem(InfoScmResult infoScmResult) protected abstract SvnCommandprotected abstract SvnCommandprotected abstract SvnCommandprotected abstract SvnCommandprotected abstract SvnCommandprotected abstract SvnCommandprotected abstract SvnCommandprotected abstract SvnCommandprotected abstract SvnCommandprotected abstract SvnCommandprotected abstract SvnCommandprotected abstract SvnCommandprotected abstract StringgetRepositoryURL(File path) Returns the scm reserved file name where the SCM stores information like '.git', '.svn'.protected abstract SvnCommandprotected abstract SvnCommandprotected abstract SvnCommandprotected abstract SvnCommandinfo(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) list(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) List each element (files and directories) of fileSet as they exist in the repository.Try to create aScmProviderRepositoryfor this provider from the given working directory (created through a previous checkout).makeProviderScmRepository(String scmSpecificUrl, char delimiter) mkdir(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) Create directory/directories in the repository.parseScmUrl(String scmSpecificUrl) abstract booleanremoteUrlExist(ScmProviderRepository repository, CommandParameters parameters) remove(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) status(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) tag(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) untag(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters) Deletes a tag.update(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) validateScmUrl(String scmSpecificUrl, char delimiter) Validate the scm url.Methods inherited from class AbstractScmProvider
add, add, add, blame, blame, branch, branch, branch, changeLog, changeLog, changeLog, changeLog, changeLog, changeLog, changeLog, changeLog, changeLog, checkIn, checkIn, checkIn, checkIn, checkOut, checkOut, checkOut, checkOut, checkOut, checkOut, checkOut, diff, diff, edit, edit, export, export, export, export, export, list, list, login, mkdir, remoteInfo, remove, requiresEditMode, sanitizeTagName, status, tag, tag, tag, unedit, unedit, update, update, update, update, update, update, update, update, update, update, update, update, validateTagNameMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ScmProvider
setInteractive
-
Field Details
-
CURRENT_WORKING_DIRECTORY
- See Also:
-
-
Constructor Details
-
AbstractSvnScmProvider
public AbstractSvnScmProvider()
-
-
Method Details
-
getScmSpecificFilename
Returns the scm reserved file name where the SCM stores information like '.git', '.svn'.- Specified by:
getScmSpecificFilenamein interfaceScmProvider- Overrides:
getScmSpecificFilenamein classAbstractScmProvider- Returns:
- the scm reserved file name
-
makeProviderScmRepository
public ScmProviderRepository makeProviderScmRepository(String scmSpecificUrl, char delimiter) throws ScmRepositoryException - Throws:
ScmRepositoryException
-
checkCurrentWorkingDirectoryUrl
private boolean checkCurrentWorkingDirectoryUrl() -
findUrlInfoItem
-
makeProviderScmRepository
public ScmProviderRepository makeProviderScmRepository(File path) throws ScmRepositoryException, UnknownRepositoryStructure Try to create aScmProviderRepositoryfor this provider from the given working directory (created through a previous checkout). This is only successful if the working directory is recognized by this SCM provider.- Specified by:
makeProviderScmRepositoryin interfaceScmProvider- Overrides:
makeProviderScmRepositoryin classAbstractScmProvider- Parameters:
path- the checkout(working) directory- Returns:
- the repository bound to this provider
- Throws:
ScmRepositoryException- in case the given directory does not contain a valid working directory recognized by this providerUnknownRepositoryStructure- in case the provider does not support this way of initializing an ScmProviderRepository
-
getRepositoryURL
- Throws:
ScmException
-
validateScmUrl
Validate the scm url.- Specified by:
validateScmUrlin interfaceScmProvider- Overrides:
validateScmUrlin classAbstractScmProvider- Parameters:
scmSpecificUrl- the SCM urldelimiter- the delimiter used in the SCM url- Returns:
- returns a list of messages if the validation failed
-
getScmType
-
parseScmUrl
-
getAddCommand
-
add
public AddScmResult add(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException TODO: why public? This should be protected, no?- Overrides:
addin classAbstractScmProvider- Throws:
ScmException
-
getBranchCommand
-
branch
protected BranchScmResult branch(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Overrides:
branchin classAbstractScmProvider- Throws:
ScmException
-
getChangeLogCommand
-
changelog
public ChangeLogScmResult changelog(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Overrides:
changelogin classAbstractScmProvider- Throws:
ScmException
-
getCheckInCommand
-
checkin
public CheckInScmResult checkin(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Overrides:
checkinin classAbstractScmProvider- Throws:
ScmException
-
getCheckOutCommand
-
checkout
public CheckOutScmResult checkout(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Overrides:
checkoutin classAbstractScmProvider- Throws:
ScmException
-
getDiffCommand
-
diff
public DiffScmResult diff(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Overrides:
diffin classAbstractScmProvider- Throws:
ScmException
-
getExportCommand
-
export
protected ExportScmResult export(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Overrides:
exportin classAbstractScmProvider- Throws:
ScmException
-
getRemoveCommand
-
remove
public RemoveScmResult remove(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Overrides:
removein classAbstractScmProvider- Throws:
ScmException
-
getStatusCommand
-
status
public StatusScmResult status(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Overrides:
statusin classAbstractScmProvider- Throws:
ScmException
-
getTagCommand
-
tag
public TagScmResult tag(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Overrides:
tagin classAbstractScmProvider- Throws:
ScmException
-
getUntagCommand
-
untag
public UntagScmResult untag(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException Deletes a tag.- Specified by:
untagin interfaceScmProvider- Overrides:
untagin classAbstractScmProvider- Parameters:
repository- the source control systemfileSet- a fileset with the relevant working directory as basedirparameters- TODO- Returns:
- TODO
- Throws:
ScmException- if any
-
getUpdateCommand
-
update
public UpdateScmResult update(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Overrides:
updatein classAbstractScmProvider- Throws:
ScmException
-
executeCommand
protected ScmResult executeCommand(SvnCommand command, ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Throws:
ScmException
-
getListCommand
-
list
public ListScmResult list(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException List each element (files and directories) of fileSet as they exist in the repository.- Overrides:
listin classAbstractScmProvider- Parameters:
repository- the source control systemfileSet- the files to listparameters- TODO- Returns:
- the list of files in the repository
- Throws:
ScmException- if any
-
getInfoCommand
-
info
public InfoScmResult info(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Specified by:
infoin interfaceScmProvider- Overrides:
infoin classAbstractScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copyparameters- some parameters (not use currently but for future use)- Returns:
- if the scm implementation doesn't support "info" result will
null - Throws:
ScmException- if any
-
blame
protected BlameScmResult blame(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Overrides:
blamein classAbstractScmProvider- Throws:
ScmException
-
getBlameCommand
-
mkdir
public MkdirScmResult mkdir(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException Create directory/directories in the repository.- Overrides:
mkdirin classAbstractScmProvider- Parameters:
repository- TODOfileSet- TODOparameters- TODO- Returns:
- TODO
- Throws:
ScmException- if any
-
getMkdirCommand
-
remoteUrlExist
public abstract boolean remoteUrlExist(ScmProviderRepository repository, CommandParameters parameters) throws ScmException - Parameters:
repository-parameters-- Returns:
- true if remote url exists
- Throws:
ScmException- Since:
- 1.8
-