Class AbstractGitScmProvider
- java.lang.Object
-
- org.apache.maven.scm.provider.AbstractScmProvider
-
- org.apache.maven.scm.provider.git.AbstractGitScmProvider
-
- All Implemented Interfaces:
ScmProvider
- Direct Known Subclasses:
GitExeScmProvider
public abstract class AbstractGitScmProvider extends AbstractScmProvider
SCM Provider for git- Author:
- Emmanuel Venisse
-
-
Field Summary
-
Fields inherited from interface org.apache.maven.scm.provider.ScmProvider
ROLE
-
-
Constructor Summary
Constructors Constructor Description AbstractGitScmProvider()
-
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, list, login, mkdir, mkdir, remove, requiresEditMode, sanitizeTagName, status, tag, tag, tag, unedit, unedit, update, update, update, update, update, update, update, update, update, update, update, update, validateTagName
-
-
-
-
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
-
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()
-
getAddCommand
protected abstract GitCommand getAddCommand()
-
add
public AddScmResult add(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
add
in classAbstractScmProvider
- Throws:
ScmException
-
getBranchCommand
protected abstract GitCommand getBranchCommand()
-
branch
protected BranchScmResult branch(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
branch
in classAbstractScmProvider
- Throws:
ScmException
-
getChangeLogCommand
protected abstract GitCommand getChangeLogCommand()
-
changelog
public ChangeLogScmResult changelog(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
changelog
in classAbstractScmProvider
- Throws:
ScmException
-
getCheckInCommand
protected abstract GitCommand getCheckInCommand()
-
checkin
public CheckInScmResult checkin(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
checkin
in classAbstractScmProvider
- Throws:
ScmException
-
getCheckOutCommand
protected abstract GitCommand getCheckOutCommand()
-
checkout
public CheckOutScmResult checkout(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
checkout
in classAbstractScmProvider
- Throws:
ScmException
-
getDiffCommand
protected abstract GitCommand getDiffCommand()
-
diff
public DiffScmResult diff(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
diff
in classAbstractScmProvider
- Throws:
ScmException
-
getExportCommand
protected abstract GitCommand getExportCommand()
-
export
protected ExportScmResult export(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
export
in classAbstractScmProvider
- Throws:
ScmException
-
getRemoveCommand
protected abstract GitCommand getRemoveCommand()
-
remove
public RemoveScmResult remove(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
remove
in classAbstractScmProvider
- Throws:
ScmException
-
getStatusCommand
protected abstract GitCommand getStatusCommand()
-
status
public StatusScmResult status(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
status
in classAbstractScmProvider
- Throws:
ScmException
-
getTagCommand
protected abstract GitCommand getTagCommand()
-
tag
public TagScmResult tag(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
tag
in classAbstractScmProvider
- Throws:
ScmException
-
getUpdateCommand
protected abstract GitCommand getUpdateCommand()
-
update
public UpdateScmResult update(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
update
in classAbstractScmProvider
- Throws:
ScmException
-
executeCommand
protected ScmResult executeCommand(GitCommand command, ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Throws:
ScmException
-
getInfoCommand
protected abstract GitCommand 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 GitCommand getBlameCommand()
-
remoteInfo
public RemoteInfoScmResult remoteInfo(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Specified by:
remoteInfo
in interfaceScmProvider
- Overrides:
remoteInfo
in classAbstractScmProvider
- Parameters:
repository
- the source control systemfileSet
- not use currently but for future useparameters
- some parameters (not use currently but for future use)- Returns:
- if the scm implementation doesn't support "info" result will
null
- Throws:
ScmException
-
getRemoteInfoCommand
protected abstract GitCommand getRemoteInfoCommand()
-
-