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
public abstract class AbstractSvnScmProvider extends AbstractScmProvider
SCM Provider for Subversion
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
AbstractSvnScmProvider.ScmUrlParserResult
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
CHECK_WORKING_DIRECTORY_URL
-
Fields inherited from interface org.apache.maven.scm.provider.ScmProvider
ROLE
-
-
Constructor Summary
Constructors Constructor Description AbstractSvnScmProvider()
-
Method Summary
-
Methods inherited from class org.apache.maven.scm.provider.AbstractScmProvider
add, add, add, addListener, blame, blame, branch, branch, branch, changeLog, changeLog, changeLog, changeLog, changeLog, changeLog, changeLog, changeLog, changeLog, checkIn, checkIn, checkIn, checkOut, checkOut, checkOut, checkOut, checkOut, checkOut, checkOut, diff, diff, edit, edit, export, export, export, export, export, getLogger, 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, validateTagName
-
-
-
-
Field Detail
-
CHECK_WORKING_DIRECTORY_URL
private static final java.lang.String CHECK_WORKING_DIRECTORY_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getScmSpecificFilename
public java.lang.String getScmSpecificFilename()
Returns the scm reserved file name where the SCM stores information like 'CVS', '.svn'.- Specified by:
getScmSpecificFilename
in interfaceScmProvider
- Overrides:
getScmSpecificFilename
in classAbstractScmProvider
- Returns:
- the scm reserved file name
-
makeProviderScmRepository
public ScmProviderRepository makeProviderScmRepository(java.lang.String scmSpecificUrl, char delimiter) throws ScmRepositoryException
- Throws:
ScmRepositoryException
-
checkWorkingDirectoryUrl
private boolean checkWorkingDirectoryUrl()
-
findUrlInfoItem
private java.lang.String findUrlInfoItem(InfoScmResult infoScmResult)
-
makeProviderScmRepository
public ScmProviderRepository makeProviderScmRepository(java.io.File path) throws ScmRepositoryException, UnknownRepositoryStructure
- Specified by:
makeProviderScmRepository
in interfaceScmProvider
- Overrides:
makeProviderScmRepository
in classAbstractScmProvider
- Throws:
ScmRepositoryException
UnknownRepositoryStructure
-
getRepositoryURL
protected abstract java.lang.String getRepositoryURL(java.io.File path) throws ScmException
- Throws:
ScmException
-
validateScmUrl
public java.util.List<java.lang.String> validateScmUrl(java.lang.String scmSpecificUrl, char delimiter)
Validate the scm url.- Specified by:
validateScmUrl
in interfaceScmProvider
- Overrides:
validateScmUrl
in classAbstractScmProvider
- Parameters:
scmSpecificUrl
- The SCM urldelimiter
- The delimiter used in the SCM url- Returns:
- Returns a list of messages if the validation failed
-
getScmType
public java.lang.String getScmType()
-
parseScmUrl
private AbstractSvnScmProvider.ScmUrlParserResult parseScmUrl(java.lang.String scmSpecificUrl)
-
getAddCommand
protected abstract SvnCommand getAddCommand()
-
add
public AddScmResult add(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
add
in classAbstractScmProvider
- Throws:
ScmException
-
getBranchCommand
protected abstract SvnCommand getBranchCommand()
-
branch
protected BranchScmResult branch(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
branch
in classAbstractScmProvider
- Throws:
ScmException
-
getChangeLogCommand
protected abstract SvnCommand getChangeLogCommand()
-
changelog
public ChangeLogScmResult changelog(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
changelog
in classAbstractScmProvider
- Throws:
ScmException
-
getCheckInCommand
protected abstract SvnCommand getCheckInCommand()
-
checkin
public CheckInScmResult checkin(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
checkin
in classAbstractScmProvider
- Throws:
ScmException
-
getCheckOutCommand
protected abstract SvnCommand getCheckOutCommand()
-
checkout
public CheckOutScmResult checkout(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
checkout
in classAbstractScmProvider
- Throws:
ScmException
-
getDiffCommand
protected abstract SvnCommand getDiffCommand()
-
diff
public DiffScmResult diff(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
diff
in classAbstractScmProvider
- Throws:
ScmException
-
getExportCommand
protected abstract SvnCommand getExportCommand()
-
export
protected ExportScmResult export(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
export
in classAbstractScmProvider
- Throws:
ScmException
-
getRemoveCommand
protected abstract SvnCommand getRemoveCommand()
-
remove
public RemoveScmResult remove(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
remove
in classAbstractScmProvider
- Throws:
ScmException
-
getStatusCommand
protected abstract SvnCommand getStatusCommand()
-
status
public StatusScmResult status(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
status
in classAbstractScmProvider
- Throws:
ScmException
-
getTagCommand
protected abstract SvnCommand getTagCommand()
-
tag
public TagScmResult tag(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
tag
in classAbstractScmProvider
- Throws:
ScmException
-
getUpdateCommand
protected abstract SvnCommand getUpdateCommand()
-
update
public UpdateScmResult update(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
update
in classAbstractScmProvider
- Throws:
ScmException
-
executeCommand
protected ScmResult executeCommand(SvnCommand command, ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Throws:
ScmException
-
getListCommand
protected abstract SvnCommand 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:
list
in classAbstractScmProvider
- Parameters:
repository
- the source control systemfileSet
- the files to list- Returns:
- The list of files in the repository
- Throws:
NoSuchCommandScmException
- unless overriden by subclassScmException
- if any
-
getInfoCommand
protected abstract SvnCommand getInfoCommand()
-
info
public InfoScmResult info(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Specified by:
info
in interfaceScmProvider
- Overrides:
info
in 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
-
blame
protected BlameScmResult blame(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
blame
in classAbstractScmProvider
- Throws:
ScmException
-
getBlameCommand
protected abstract SvnCommand getBlameCommand()
-
mkdir
public MkdirScmResult mkdir(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
Create directory/directories in the repository.- Overrides:
mkdir
in classAbstractScmProvider
- Returns:
- Throws:
ScmException
-
getMkdirCommand
protected abstract SvnCommand 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
-
-