Class AbstractCvsScmProvider
- java.lang.Object
-
- org.apache.maven.scm.provider.AbstractScmProvider
-
- org.apache.maven.scm.provider.cvslib.AbstractCvsScmProvider
-
- All Implemented Interfaces:
ScmProvider
- Direct Known Subclasses:
CvsExeScmProvider
public abstract class AbstractCvsScmProvider extends AbstractScmProvider
- Author:
- Emmanuel Venisse , Trygve Laugstøl
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractCvsScmProvider.ScmUrlParserResult
The current ScmUrlParserResult
-
Field Summary
Fields Modifier and Type Field Description static String
TRANSPORT_EXT
ext transport methodstatic String
TRANSPORT_LOCAL
local transport methodstatic String
TRANSPORT_LSERVER
lserver transport methodstatic String
TRANSPORT_PSERVER
pserver transport methodstatic String
TRANSPORT_SSPI
sspi transport method-
Fields inherited from interface org.apache.maven.scm.provider.ScmProvider
ROLE
-
-
Constructor Summary
Constructors Constructor Description AbstractCvsScmProvider()
-
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, info, list, list, mkdir, remoteInfo, remove, requiresEditMode, status, tag, tag, tag, unedit, unedit, update, update, update, update, update, update, update, update, update, update, update, update
-
-
-
-
Field Detail
-
TRANSPORT_EXT
public static final String TRANSPORT_EXT
ext transport method- See Also:
- Constant Field Values
-
TRANSPORT_LOCAL
public static final String TRANSPORT_LOCAL
local transport method- See Also:
- Constant Field Values
-
TRANSPORT_LSERVER
public static final String TRANSPORT_LSERVER
lserver transport method- See Also:
- Constant Field Values
-
TRANSPORT_PSERVER
public static final String TRANSPORT_PSERVER
pserver transport method- See Also:
- Constant Field Values
-
TRANSPORT_SSPI
public static final String TRANSPORT_SSPI
sspi transport method- See Also:
- Constant Field Values
-
-
Method Detail
-
getScmSpecificFilename
public 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
-
sanitizeTagName
public String sanitizeTagName(String arg0)
Given a tag name, make it suitable for this SCM provider. For example, CVS converts "." into "_"- Specified by:
sanitizeTagName
in interfaceScmProvider
- Overrides:
sanitizeTagName
in classAbstractScmProvider
- Parameters:
arg0
- input tag name- Returns:
- sanitized tag name
-
validateTagName
public boolean validateTagName(String arg0)
Check if this tag is valid for this SCM provider.- Specified by:
validateTagName
in interfaceScmProvider
- Overrides:
validateTagName
in classAbstractScmProvider
- Parameters:
arg0
- tag name to check- Returns:
- true if tag is valid
-
makeProviderScmRepository
public ScmProviderRepository makeProviderScmRepository(String scmSpecificUrl, char delimiter) throws ScmRepositoryException
- Throws:
ScmRepositoryException
-
makeProviderScmRepository
public ScmProviderRepository makeProviderScmRepository(File path) throws ScmRepositoryException, UnknownRepositoryStructure
- Specified by:
makeProviderScmRepository
in interfaceScmProvider
- Overrides:
makeProviderScmRepository
in classAbstractScmProvider
- Throws:
ScmRepositoryException
UnknownRepositoryStructure
-
validateScmUrl
public List<String> validateScmUrl(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 String getScmType()
-
add
public AddScmResult add(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
add
in classAbstractScmProvider
- Throws:
ScmException
-
branch
public BranchScmResult branch(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
branch
in classAbstractScmProvider
- Throws:
ScmException
-
blame
protected BlameScmResult blame(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
blame
in classAbstractScmProvider
- Throws:
ScmException
-
changelog
public ChangeLogScmResult changelog(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
changelog
in classAbstractScmProvider
- Throws:
ScmException
-
checkin
public CheckInScmResult checkin(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
checkin
in classAbstractScmProvider
- Throws:
ScmException
-
checkout
public CheckOutScmResult checkout(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
checkout
in classAbstractScmProvider
- Throws:
ScmException
-
diff
public DiffScmResult diff(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
diff
in classAbstractScmProvider
- Throws:
ScmException
-
export
protected ExportScmResult export(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
export
in classAbstractScmProvider
- Throws:
ScmException
-
login
public LoginScmResult login(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
login
in classAbstractScmProvider
- Throws:
ScmException
-
remove
public RemoveScmResult remove(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
remove
in classAbstractScmProvider
- Throws:
ScmException
-
status
public StatusScmResult status(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
status
in classAbstractScmProvider
- Throws:
ScmException
-
tag
public TagScmResult tag(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
tag
in classAbstractScmProvider
- Throws:
ScmException
-
tag
protected TagScmResult tag(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters, ScmTagParameters scmParameters) throws ScmException
- Throws:
ScmException
-
update
public UpdateScmResult update(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
update
in classAbstractScmProvider
- Throws:
ScmException
-
list
protected 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
-
mkdir
protected MkdirScmResult mkdir(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
Create directory/directories in the repository.- Overrides:
mkdir
in classAbstractScmProvider
- Returns:
- Throws:
ScmException
-
getRelativePath
public static String getRelativePath(File basedir, File f) throws ScmException, IOException
- Parameters:
basedir
- not nullf
- not null- Returns:
- the relative path
- Throws:
ScmException
- if anyIOException
- if any
-
parseScmUrl
protected AbstractCvsScmProvider.ScmUrlParserResult parseScmUrl(String scmSpecificUrl, char delimiter)
-
getAddCommand
protected abstract Command getAddCommand()
-
getBranchCommand
protected abstract Command getBranchCommand()
-
getBlameCommand
protected abstract Command getBlameCommand()
-
getChangeLogCommand
protected abstract Command getChangeLogCommand()
-
getCheckInCommand
protected abstract Command getCheckInCommand()
-
getCheckOutCommand
protected abstract Command getCheckOutCommand()
-
getDiffCommand
protected abstract Command getDiffCommand()
-
getExportCommand
protected abstract Command getExportCommand()
-
getListCommand
protected abstract Command getListCommand()
-
getLoginCommand
protected abstract Command getLoginCommand()
-
getRemoveCommand
protected abstract Command getRemoveCommand()
-
getStatusCommand
protected abstract Command getStatusCommand()
-
getTagCommand
protected abstract Command getTagCommand()
-
getUpdateCommand
protected abstract Command getUpdateCommand()
-
getMkdirCommand
protected abstract Command getMkdirCommand()
-
-