Class ScmProviderStub
- java.lang.Object
-
- org.apache.maven.scm.provider.ScmProviderStub
-
- All Implemented Interfaces:
ScmProvider
public class ScmProviderStub extends Object implements ScmProvider
Stub implementation of ScmProvider for unit testing purposes. It allows setting the expected results that the different methods will return. More information about Stubs on Martin Fowler's TestDouble- Author:
- Carlos Sanchez
-
-
Constructor Summary
Constructors Constructor Description ScmProviderStub()Create a new ScmProviderStub with bogus (not null) attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AddScmResultadd(ScmRepository repository, ScmFileSet fileSet)Adds the given files to the source control system.AddScmResultadd(ScmRepository repository, ScmFileSet fileSet, String message)Adds the given files to the source control system.AddScmResultadd(ScmRepository repository, ScmFileSet fileSet, CommandParameters commandParameters)Adds the given files to the source control system.BlameScmResultblame(BlameScmRequest blameScmRequest)BlameScmResultblame(ScmRepository repository, ScmFileSet fileSet, String filename)Returns the blame of specified file.BranchScmResultbranch(ScmRepository repository, ScmFileSet fileSet, String branchName)Branch (or label in some systems) will create a branch of the source file with a certain branch name.BranchScmResultbranch(ScmRepository repository, ScmFileSet fileSet, String branchName, String message)Branch (or label in some systems) will create a branch of the source file with a certain branch name.BranchScmResultbranch(ScmRepository repository, ScmFileSet fileSet, String branchName, ScmBranchParameters scmBranchParameters)Branch (or label in some systems) will create a branch of the source file with a certain branch name.ChangeLogScmResultchangeLog(ChangeLogScmRequest scmRequest)Returns the changes that have happened in the source control system in a certain period of time.ChangeLogScmResultchangeLog(ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag)Returns the changes that have happened in the source control system between two tags.ChangeLogScmResultchangeLog(ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag, String datePattern)Returns the changes that have happened in the source control system between two tags.ChangeLogScmResultchangeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, String branch)Returns the changes that have happened in the source control system in a certain period of time.ChangeLogScmResultchangeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, String branch, String datePattern)Returns the changes that have happened in the source control system in a certain period of time.ChangeLogScmResultchangeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, ScmBranch branch)Returns the changes that have happened in the source control system in a certain period of time.ChangeLogScmResultchangeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, ScmBranch branch, String datePattern)Returns the changes that have happened in the source control system in a certain period of time.ChangeLogScmResultchangeLog(ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, ScmVersion endVersion)Returns the changes that have happened in the source control system between two tags.ChangeLogScmResultchangeLog(ScmRepository repository, ScmFileSet fileSet, ScmVersion startRevision, ScmVersion endRevision, String datePattern)Returns the changes that have happened in the source control system between two tags.CheckInScmResultcheckIn(ScmRepository repository, ScmFileSet fileSet, String message)Save the changes you have done into the repository.CheckInScmResultcheckIn(ScmRepository repository, ScmFileSet fileSet, String tag, String message)Save the changes you have done into the repository.CheckInScmResultcheckIn(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters)Save the changes you have done into the repository.CheckInScmResultcheckIn(ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message)Save the changes you have done into the repository.CheckOutScmResultcheckOut(ScmRepository repository, ScmFileSet fileSet)Create a copy of the repository on your local machine.CheckOutScmResultcheckOut(ScmRepository scmRepository, ScmFileSet scmFileSet, boolean recursive)Create a copy of the repository on your local machine.CheckOutScmResultcheckOut(ScmRepository repository, ScmFileSet fileSet, String tag)Create a copy of the repository on your local machine.CheckOutScmResultcheckOut(ScmRepository scmRepository, ScmFileSet scmFileSet, String tag, boolean recursive)Create a copy of the repository on your local machine.CheckOutScmResultcheckOut(ScmRepository repository, ScmFileSet fileSet, ScmVersion version)Create a copy of the repository on your local machine.CheckOutScmResultcheckOut(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version, boolean recursive)Create a copy of the repository on your local machine.CheckOutScmResultcheckOut(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version, CommandParameters commandParameters)Create a copy of the repository on your local machine.DiffScmResultdiff(ScmRepository repository, ScmFileSet fileSet, String startRevision, String endRevision)Create a diff between two branch/tag/revision.DiffScmResultdiff(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion startVersion, ScmVersion endVersion)Create a diff between two branch/tag/revision.EditScmResultedit(ScmRepository repository, ScmFileSet fileSet)Make a file editable.ExportScmResultexport(ScmRepository repository, ScmFileSet fileSet)Create an exported copy of the repository on your local machine.ExportScmResultexport(ScmRepository repository, ScmFileSet fileSet, String tag)Create an exported copy of the repository on your local machine.ExportScmResultexport(ScmRepository repository, ScmFileSet fileSet, String tag, String outputDirectory)Create an exported copy of the repository on your local machine.ExportScmResultexport(ScmRepository repository, ScmFileSet fileSet, ScmVersion version)Create an exported copy of the repository on your local machine.ExportScmResultexport(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String outputDirectory)Create an exported copy of the repository on your local machine.AddScmResultgetAddScmResult()BlameScmResultgetBlameScmResult()BranchScmResultgetBranchScmResult()ChangeLogScmResultgetChangeLogScmResult()CheckInScmResultgetCheckInScmResult()CheckOutScmResultgetCheckOutScmResult()DiffScmResultgetDiffScmResult()EditScmResultgetEditScmResult()ExportScmResultgetExportScmResult()ListScmResultgetListScmResult()MkdirScmResultgetMkdirScmResult()RemoveScmResultgetRemoveScmResult()StringgetScmSpecificFilename()Returns the scm reserved file name where the SCM stores information like '.git', '.svn'.StringgetScmType()StatusScmResultgetStatusScmResult()TagScmResultgetTagScmResult()UnEditScmResultgetUnEditScmResult()UntagScmResultgetUntagScmResult()UpdateScmResultgetUpdateScmResult()InfoScmResultinfo(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)ListScmResultlist(ScmRepository repository, ScmFileSet fileSet, boolean recursive, String tag)List each element (files and directories) of fileSet as they exist in the repository.ListScmResultlist(ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version)List each element (files and directories) of fileSet as they exist in the repository.ScmProviderRepositorymakeProviderScmRepository(File path)Try to create aScmProviderRepositoryfor this provider from the given working directory (created through a previous checkout).ScmProviderRepositorymakeProviderScmRepository(String scmSpecificUrl, char delimiter)MkdirScmResultmkdir(ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal)Create directory/directories in the repository.RemoteInfoScmResultremoteInfo(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)RemoveScmResultremove(ScmRepository repository, ScmFileSet fileSet, String message)Removes the given files from the source control system.booleanrequiresEditMode()StringsanitizeTagName(String tag)Given a tag name, make it suitable for this SCM provider.voidsetAddScmResult(AddScmResult addScmResult)voidsetBlameScmResult(BlameScmResult blameScmResult)voidsetBranchScmResult(BranchScmResult branchScmResult)voidsetChangeLogScmResult(ChangeLogScmResult changeLogScmResult)voidsetCheckInScmResult(CheckInScmResult checkInScmResult)voidsetCheckOutScmResult(CheckOutScmResult checkOutScmResult)voidsetDiffScmResult(DiffScmResult diffScmResult)voidsetEditScmResult(EditScmResult editScmResult)voidsetExportScmResult(ExportScmResult exportScmResult)voidsetListScmResult(ListScmResult listScmResult)voidsetMkdirScmResult(MkdirScmResult mkdirScmResult)voidsetRemoveScmResult(RemoveScmResult removeScmResult)voidsetScmSpecificFilename(String scmSpecificFilename)voidsetStatusScmResult(StatusScmResult statusScmResult)voidsetTagScmResult(TagScmResult tagScmResult)voidsetUnEditScmResult(UnEditScmResult unEditScmResult)voidsetUntagScmResult(UntagScmResult untagScmResult)voidsetUpdateScmResult(UpdateScmResult updateScmResult)StatusScmResultstatus(ScmRepository repository, ScmFileSet fileSet)Returns the status of the files in the source control system.TagScmResulttag(ScmRepository repository, ScmFileSet fileSet, String tag)Tag (or label in some systems) will tag the source file with a certain tag.TagScmResulttag(ScmRepository repository, ScmFileSet fileSet, String tag, String message)Tag (or label in some systems) will tag the source file with a certain tag.TagScmResulttag(ScmRepository repository, ScmFileSet fileSet, String tagName, ScmTagParameters scmTagParameters)Tag (or label in some systems) will tag the source file with a certain tag.UnEditScmResultunedit(ScmRepository repository, ScmFileSet fileSet)Make a file no longer editable.UntagScmResultuntag(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters)Deletes a tag.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet)Updates the copy on the local machine with the changes in the repository.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, boolean runChangelog)Updates the copy on the local machine with the changes in the repository.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, String tag)Updates the copy on the local machine with the changes in the repository.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, String tag, boolean runChangelog)Updates the copy on the local machine with the changes in the repository.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, String tag, String datePattern)Updates the copy on the local machine with the changes in the repository.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate)Updates the copy on the local machine with the changes in the repository.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate, String datePattern)Updates the copy on the local machine with the changes in the repository.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate, String datePattern, boolean runChangelog)UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, ScmVersion version)Updates the copy on the local machine with the changes in the repository.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, boolean runChangelog)Updates the copy on the local machine with the changes in the repository.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String datePattern)Updates the copy on the local machine with the changes in the repository.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate)Updates the copy on the local machine with the changes in the repository.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate, String datePattern)Updates the copy on the local machine with the changes in the repository.List<String>validateScmUrl(String scmSpecificUrl, char delimiter)Validate the scm url.booleanvalidateTagName(String tag)Check if this tag is valid for this SCM provider.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.maven.scm.provider.ScmProvider
setInteractive
-
-
-
-
Constructor Detail
-
ScmProviderStub
public ScmProviderStub()
Create a new ScmProviderStub with bogus (not null) attributes.
-
-
Method Detail
-
sanitizeTagName
public String sanitizeTagName(String tag)
Given a tag name, make it suitable for this SCM provider.- Specified by:
sanitizeTagNamein interfaceScmProvider- Parameters:
tag- input tag name- Returns:
- sanitized tag name
-
validateTagName
public boolean validateTagName(String tag)
Check if this tag is valid for this SCM provider.- Specified by:
validateTagNamein interfaceScmProvider- Parameters:
tag- tag name to check- Returns:
- true if tag is valid
-
getScmType
public String getScmType()
- Specified by:
getScmTypein interfaceScmProvider
-
setScmSpecificFilename
public void setScmSpecificFilename(String scmSpecificFilename)
-
requiresEditMode
public boolean requiresEditMode()
- Specified by:
requiresEditModein interfaceScmProvider
-
setAddScmResult
public void setAddScmResult(AddScmResult addScmResult)
-
getAddScmResult
public AddScmResult getAddScmResult()
-
setBranchScmResult
public void setBranchScmResult(BranchScmResult branchScmResult)
-
getBranchScmResult
public BranchScmResult getBranchScmResult()
-
setCheckInScmResult
public void setCheckInScmResult(CheckInScmResult checkInScmResult)
-
getCheckInScmResult
public CheckInScmResult getCheckInScmResult()
-
setCheckOutScmResult
public void setCheckOutScmResult(CheckOutScmResult checkOutScmResult)
-
getCheckOutScmResult
public CheckOutScmResult getCheckOutScmResult()
-
setChangeLogScmResult
public void setChangeLogScmResult(ChangeLogScmResult changeLogScmResult)
-
getChangeLogScmResult
public ChangeLogScmResult getChangeLogScmResult()
-
setDiffScmResult
public void setDiffScmResult(DiffScmResult diffScmResult)
-
getDiffScmResult
public DiffScmResult getDiffScmResult()
-
getExportScmResult
public ExportScmResult getExportScmResult()
-
setExportScmResult
public void setExportScmResult(ExportScmResult exportScmResult)
-
setTagScmResult
public void setTagScmResult(TagScmResult tagScmResult)
-
getTagScmResult
public TagScmResult getTagScmResult()
-
setUntagScmResult
public void setUntagScmResult(UntagScmResult untagScmResult)
-
getUntagScmResult
public UntagScmResult getUntagScmResult()
-
setRemoveScmResult
public void setRemoveScmResult(RemoveScmResult removeScmResult)
-
getRemoveScmResult
public RemoveScmResult getRemoveScmResult()
-
setStatusScmResult
public void setStatusScmResult(StatusScmResult statusScmResult)
-
getStatusScmResult
public StatusScmResult getStatusScmResult()
-
setUpdateScmResult
public void setUpdateScmResult(UpdateScmResult updateScmResult)
-
getUpdateScmResult
public UpdateScmResult getUpdateScmResult()
-
setEditScmResult
public void setEditScmResult(EditScmResult editScmResult)
-
getEditScmResult
public EditScmResult getEditScmResult()
-
setUnEditScmResult
public void setUnEditScmResult(UnEditScmResult unEditScmResult)
-
getUnEditScmResult
public UnEditScmResult getUnEditScmResult()
-
setListScmResult
public void setListScmResult(ListScmResult listScmResult)
-
getListScmResult
public ListScmResult getListScmResult()
-
setBlameScmResult
public void setBlameScmResult(BlameScmResult blameScmResult)
-
getBlameScmResult
public BlameScmResult getBlameScmResult()
-
getMkdirScmResult
public MkdirScmResult getMkdirScmResult()
-
setMkdirScmResult
public void setMkdirScmResult(MkdirScmResult mkdirScmResult)
-
makeProviderScmRepository
public ScmProviderRepository makeProviderScmRepository(String scmSpecificUrl, char delimiter) throws ScmRepositoryException
- Specified by:
makeProviderScmRepositoryin interfaceScmProvider- Throws:
ScmRepositoryException
-
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- 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
-
validateScmUrl
public List<String> validateScmUrl(String scmSpecificUrl, char delimiter)
Validate the scm url.- Specified by:
validateScmUrlin interfaceScmProvider- Parameters:
scmSpecificUrl- the SCM urldelimiter- the delimiter used in the SCM url- Returns:
- returns a list of messages if the validation failed
-
getScmSpecificFilename
public String getScmSpecificFilename()
Returns the scm reserved file name where the SCM stores information like '.git', '.svn'.- Specified by:
getScmSpecificFilenamein interfaceScmProvider- Returns:
- the scm reserved file name
-
add
public AddScmResult add(ScmRepository repository, ScmFileSet fileSet) throws ScmException
Adds the given files to the source control system.- Specified by:
addin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to be added- Returns:
- an
AddScmResultthat contains the files that have been added - Throws:
ScmException- if any
-
add
public AddScmResult add(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException
Adds the given files to the source control system.- Specified by:
addin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to be addedmessage- a string that is a comment on the new added file- Returns:
- an
AddScmResultthat contains the files that have been added - Throws:
ScmException- if any
-
add
public AddScmResult add(ScmRepository repository, ScmFileSet fileSet, CommandParameters commandParameters) throws ScmException
Description copied from interface:ScmProviderAdds the given files to the source control system.- Specified by:
addin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to be addedcommandParameters-CommandParameters- Returns:
- an
AddScmResultthat contains the files that have been added - Throws:
ScmException- if any
-
branch
public BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName) throws ScmException
Branch (or label in some systems) will create a branch of the source file with a certain branch name.- Specified by:
branchin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to branch. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.branchName- the branch name to apply to the files- Returns:
- TODO
- Throws:
ScmException- if any
-
branch
public BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName, String message) throws ScmException
Branch (or label in some systems) will create a branch of the source file with a certain branch name.- Specified by:
branchin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to branch. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.branchName- the branch name to apply to the filesmessage- the commit message used for the tag creation- Returns:
- TODO
- Throws:
ScmException- if any
-
branch
public BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName, ScmBranchParameters scmBranchParameters) throws ScmException
Branch (or label in some systems) will create a branch of the source file with a certain branch name.- Specified by:
branchin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to branch. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.branchName- the branch name to apply to the filesscmBranchParameters- TODO- Returns:
- TODO
- Throws:
ScmException- if any
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, String branch) throws ScmException
Returns the changes that have happened in the source control system in a certain period of time. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to know the changes about. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.startDate- the start date of the periodendDate- the end date of the periodnumDays- the number days before the current time if startdate and enddate are nullbranch- the branch/tag name- Returns:
- the SCM result of the changelog command
- Throws:
ScmException- if any
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, String branch, String datePattern) throws ScmException
Returns the changes that have happened in the source control system in a certain period of time. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to know the changes about. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.startDate- the start date of the periodendDate- the end date of the periodnumDays- the number days before the current time if startdate and enddate are nullbranch- the branch/tag namedatePattern- the date pattern use in changelog output returned by scm tool- Returns:
- the SCM result of the changelog command
- Throws:
ScmException- if any
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag) throws ScmException
Returns the changes that have happened in the source control system between two tags. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to know the changes about. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.startTag- the start tagendTag- the end tag- Returns:
- the SCM result of the changelog command
- Throws:
ScmException- if any
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag, String datePattern) throws ScmException
Returns the changes that have happened in the source control system between two tags. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to know the changes about. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.startTag- the start tagendTag- the end tagdatePattern- the date pattern use in changelog output returned by scm tool- Returns:
- TODO
- Throws:
ScmException- if any
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, ScmBranch branch) throws ScmException
Returns the changes that have happened in the source control system in a certain period of time. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to know the changes about. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.startDate- the start date of the periodendDate- the end date of the periodnumDays- the number days before the current time if startdate and enddate are nullbranch- the branch/tag- Returns:
- the SCM result of the changelog command
- Throws:
ScmException- if any
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, ScmBranch branch, String datePattern) throws ScmException
Returns the changes that have happened in the source control system in a certain period of time. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to know the changes about. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.startDate- the start date of the periodendDate- the end date of the periodnumDays- the number days before the current time if startDate and endDate are nullbranch- the branch/tagdatePattern- the date pattern use in changelog output returned by scm tool- Returns:
- the SCM result of the changelog command
- Throws:
ScmException- if any
-
changeLog
public ChangeLogScmResult changeLog(ChangeLogScmRequest scmRequest) throws ScmException
Description copied from interface:ScmProviderReturns the changes that have happened in the source control system in a certain period of time. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmProvider- Parameters:
scmRequest- request wrapping detailed parameters for the changelog command- Returns:
- the SCM result of the changelog command
- Throws:
ScmException- if any
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, ScmVersion endVersion) throws ScmException
Returns the changes that have happened in the source control system between two tags. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to know the changes about. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.startVersion- the start branch/tag/revisionendVersion- the end branch/tag/revision- Returns:
- the SCM result of the changelog command
- Throws:
ScmException- if any
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, ScmVersion startRevision, ScmVersion endRevision, String datePattern) throws ScmException
Returns the changes that have happened in the source control system between two tags. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to know the changes about. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.startRevision- the start revisionendRevision- the end revisiondatePattern- the date pattern use in changelog output returned by scm tool- Returns:
- TODO
- Throws:
ScmException- if any
-
checkIn
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, String tag, String message) throws ScmException
Save the changes you have done into the repository. This will create a new version of the file or directory in the repository.When the fileSet has no entries, the fileSet.getBaseDir() is recursively committed. When the fileSet has entries, the commit is non-recursive and only the elements in the fileSet are committed.
- Specified by:
checkInin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to check in (sometimes called commit)tag- tag or revisionmessage- a string that is a comment on the changes that where done- Returns:
- TODO
- Throws:
ScmException- if any
-
checkIn
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException
Save the changes you have done into the repository. This will create a new version of the file or directory in the repository.When the fileSet has no entries, the fileSet.getBaseDir() is recursively committed. When the fileSet has entries, the commit is non-recursive and only the elements in the fileSet are committed.
- Specified by:
checkInin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to check in (sometimes called commit)message- a string that is a comment on the changes that where done- Returns:
- TODO
- Throws:
ScmException- if any
-
checkIn
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message) throws ScmException
Save the changes you have done into the repository. This will create a new version of the file or directory in the repository.When the fileSet has no entries, the fileSet.getBaseDir() is recursively committed. When the fileSet has entries, the commit is non-recursive and only the elements in the fileSet are committed.
- Specified by:
checkInin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to check in (sometimes called commit)revision- branch/tag/revisionmessage- a string that is a comment on the changes that where done- Returns:
- TODO
- Throws:
ScmException- if any
-
checkIn
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
Description copied from interface:ScmProviderSave the changes you have done into the repository. This will create a new version of the file or directory in the repository.When the fileSet has no entries, the fileSet.getBaseDir() is recursively committed. When the fileSet has entries, the commit is non-recursive and only the elements in the fileSet are committed.
- Specified by:
checkInin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to check in (sometimes called commit)parameters-CommandParameters- Returns:
- TODO
- Throws:
ScmException- if any
-
checkOut
public CheckOutScmResult checkOut(ScmRepository scmRepository, ScmFileSet scmFileSet, String tag, boolean recursive) throws ScmException
Create a copy of the repository on your local machine.- Specified by:
checkOutin interfaceScmProvider- Parameters:
scmRepository- the source control systemscmFileSet- the files are copied to theScmFileSet.getBasedir()locationtag- tag or revisionrecursive- whether to check out recursively- Returns:
- TODO
- Throws:
ScmException- if any
-
checkOut
public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, String tag) throws ScmException
Create a copy of the repository on your local machine.- Specified by:
checkOutin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files are copied to theScmFileSet.getBasedir()locationtag- get the version defined by the tag- Returns:
- TODO
- Throws:
ScmException- if any
-
checkOut
public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet) throws ScmException
Create a copy of the repository on your local machine.- Specified by:
checkOutin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files are copied to theScmFileSet.getBasedir()location- Returns:
- TODO
- Throws:
ScmException- if any
-
checkOut
public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) throws ScmException
Create a copy of the repository on your local machine.- Specified by:
checkOutin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files are copied to theScmFileSet.getBasedir()locationversion- get the version defined by the revision, branch or tag- Returns:
- TODO
- Throws:
ScmException- if any
-
checkOut
public CheckOutScmResult checkOut(ScmRepository scmRepository, ScmFileSet scmFileSet, boolean recursive) throws ScmException
Create a copy of the repository on your local machine.- Specified by:
checkOutin interfaceScmProvider- Parameters:
scmRepository- the source control systemscmFileSet- the files are copied to theScmFileSet.getBasedir()locationrecursive- whether to check out recursively- Returns:
- TODO
- Throws:
ScmException- if any
-
checkOut
public CheckOutScmResult checkOut(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version, boolean recursive) throws ScmException
Create a copy of the repository on your local machine.- Specified by:
checkOutin interfaceScmProvider- Parameters:
scmRepository- the source control systemscmFileSet- the files are copied to theScmFileSet.getBasedir()locationversion- get the version defined by the revision, branch or tagrecursive- whether to check out recursively- Returns:
- TODO
- Throws:
ScmException- if any
-
checkOut
public CheckOutScmResult checkOut(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version, CommandParameters commandParameters) throws ScmException
Description copied from interface:ScmProviderCreate a copy of the repository on your local machine.- Specified by:
checkOutin interfaceScmProvider- Parameters:
scmRepository- the source control systemscmFileSet- the files are copied to theScmFileSet.getBasedir()locationversion- get the version defined by the revision, branch or tagcommandParameters- parameters- Returns:
- TODO
- Throws:
ScmException- if any
-
diff
public DiffScmResult diff(ScmRepository repository, ScmFileSet fileSet, String startRevision, String endRevision) throws ScmException
Create a diff between two branch/tag/revision.- Specified by:
diffin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files are copied to theScmFileSet.getBasedir()locationstartRevision- the start revisionendRevision- the end revision- Returns:
- TODO
- Throws:
ScmException- if any
-
diff
public DiffScmResult diff(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion startVersion, ScmVersion endVersion) throws ScmException
Create a diff between two branch/tag/revision.- Specified by:
diffin interfaceScmProvider- Parameters:
scmRepository- the source control systemscmFileSet- the files are copied to theScmFileSet.getBasedir()locationstartVersion- the start branch/tag/revisionendVersion- the end branch/tag/revision- Returns:
- TODO
- Throws:
ScmException- if any
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate, String datePattern, boolean runChangelog) throws ScmException
- Returns:
- getUpdateScmResult() always
- Throws:
ScmException
-
edit
public EditScmResult edit(ScmRepository repository, ScmFileSet fileSet) throws ScmException
Make a file editable. This is used in source control systems where you look at read-only files, and you need to make them writable before you can edit them. This can also mean that no other user in the system can make the file writable.- Specified by:
editin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to make editable- Returns:
- TODO
- Throws:
ScmException- if any
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, String tag) throws ScmException
Create an exported copy of the repository on your local machine.- Specified by:
exportin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files are copied to theScmFileSet.getBasedir()locationtag- get the version defined by the tag- Returns:
- TODO
- Throws:
ScmException- if any
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, String tag, String outputDirectory) throws ScmException
Create an exported copy of the repository on your local machine.- Specified by:
exportin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files are copied to theScmFileSet.getBasedir()locationtag- get the version defined by the tagoutputDirectory- the directory where the export will be stored- Returns:
- TODO
- Throws:
ScmException- if any
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet) throws ScmException
Create an exported copy of the repository on your local machine.- Specified by:
exportin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files are copied to theScmFileSet.getBasedir()location- Returns:
- TODO
- Throws:
ScmException- if any
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) throws ScmException
Create an exported copy of the repository on your local machine.- Specified by:
exportin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files are copied to theScmFileSet.getBasedir()locationversion- get the version defined by the branch/tag/revision- Returns:
- TODO
- Throws:
ScmException- if any
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String outputDirectory) throws ScmException
Create an exported copy of the repository on your local machine.- Specified by:
exportin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files are copied to theScmFileSet.getBasedir()locationversion- get the version defined by the branch/tag/revisionoutputDirectory- the directory where the export will be stored- Returns:
- TODO
- Throws:
ScmException- if any
-
list
public ListScmResult list(ScmRepository repository, ScmFileSet fileSet, boolean recursive, String tag) throws ScmException
List each element (files and directories) of fileSet as they exist in the repository.- Specified by:
listin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to listrecursive- descend recursivelytag- use the version defined by the tag- Returns:
- the list of files in the repository
- Throws:
ScmException- if any
-
list
public ListScmResult list(ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version) throws ScmException
List each element (files and directories) of fileSet as they exist in the repository.- Specified by:
listin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to listrecursive- descend recursivelyversion- use the version defined by the branch/tag/revision- Returns:
- the list of files in the repository
- Throws:
ScmException- if any
-
remove
public RemoveScmResult remove(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException
Removes the given files from the source control system.- Specified by:
removein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to be removedmessage- TODO- Returns:
- TODO
- Throws:
ScmException- if any
-
status
public StatusScmResult status(ScmRepository repository, ScmFileSet fileSet) throws ScmException
Returns the status of the files in the source control system. The state of each file can be one of theScmFileStatusflags.- Specified by:
statusin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to know the status about. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.- Returns:
- TODO
- Throws:
ScmException- if any
-
tag
public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tag) throws ScmException
Tag (or label in some systems) will tag the source file with a certain tag.- Specified by:
tagin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to tag. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.tag- the tag name to apply to the files- Returns:
- TODO
- Throws:
ScmException- if any
-
tag
public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tag, String message) throws ScmException
Tag (or label in some systems) will tag the source file with a certain tag.- Specified by:
tagin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to tag. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.tag- the tag name to apply to the filesmessage- the commit message used for the tag creation- Returns:
- TODO
- Throws:
ScmException- if any
-
tag
public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tagName, ScmTagParameters scmTagParameters) throws ScmException
Description copied from interface:ScmProviderTag (or label in some systems) will tag the source file with a certain tag.- Specified by:
tagin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to tag. Implementations can also give the changes from theScmFileSet.getBasedir()downwards.tagName- the tag name to apply to the filesscmTagParameters- bean to pass some paramters for taggingScmTagParameters- Returns:
- TODO
- Throws:
ScmException- if any
-
untag
public UntagScmResult untag(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
Description copied from interface:ScmProviderDeletes a tag.- Specified by:
untagin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- a fileset with the relevant working directory as basedirparameters- TODO- Returns:
- TODO
- Throws:
ScmException- if any
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copytag- use the version defined by the tag- Returns:
- TODO
- Throws:
ScmException- if any
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, boolean runChangelog) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copytag- use the version defined by the tagrunChangelog- run the changelog command after the update- Returns:
- TODO
- Throws:
ScmException- if any
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, String datePattern) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copytag- use the version defined by the tagdatePattern- the date pattern use in changelog output returned by scm tool- Returns:
- TODO
- Throws:
ScmException- if any
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copytag- use the version defined by the taglastUpdate- TODO- Returns:
- TODO
- Throws:
ScmException- if any
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate, String datePattern) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copytag- use the version defined by the taglastUpdate- date of last updatedatePattern- the date pattern use in changelog output returned by scm tool- Returns:
- TODO
- Throws:
ScmException- if any
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copy- Returns:
- TODO
- Throws:
ScmException- if any
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copyversion- use the version defined by the branch/tag/revision- Returns:
- TODO
- Throws:
ScmException- if any
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, boolean runChangelog) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copyrunChangelog- run the changelog command after the update- Returns:
- TODO
- Throws:
ScmException- if any
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, boolean runChangelog) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copyversion- use the version defined by the branch/tag/revisionrunChangelog- run the changelog command after the update- Returns:
- TODO
- Throws:
ScmException- if any
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String datePattern) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copyversion- use the version defined by the branch/tag/revisiondatePattern- the date pattern use in changelog output returned by scm tool- Returns:
- TODO
- Throws:
ScmException- if any
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copyversion- use the version defined by the branch/tag/revisionlastUpdate- TODO- Returns:
- TODO
- Throws:
ScmException- if any
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate, String datePattern) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copyversion- use the version defined by the branch/tag/revisionlastUpdate- date of last updatedatePattern- the date pattern use in changelog output returned by scm tool- Returns:
- TODO
- Throws:
ScmException- if any
-
unedit
public UnEditScmResult unedit(ScmRepository repository, ScmFileSet fileSet) throws ScmException
Make a file no longer editable. This is the conterpart ofScmProvider.edit( org.apache.maven.scm.repository.ScmRepository, org.apache.maven.scm.ScmFileSet). It makes the file read-only again.- Specified by:
uneditin interfaceScmProvider- Parameters:
repository- the source control systemfileSet- the files to make uneditable- Returns:
- TODO
- Throws:
ScmException- if any
-
blame
public BlameScmResult blame(ScmRepository repository, ScmFileSet fileSet, String filename) throws ScmException
Returns the blame of specified file.- Specified by:
blamein interfaceScmProvider- Parameters:
repository- the source control systemfileSet- location of your local copyfilename- file- Returns:
- blame for specified file
- Throws:
ScmException- if any
-
blame
public BlameScmResult blame(BlameScmRequest blameScmRequest) throws ScmException
- Specified by:
blamein interfaceScmProvider- Parameters:
blameScmRequest- TODO- Returns:
- blame for the file specified in the request
- Throws:
ScmException- if any
-
mkdir
public MkdirScmResult mkdir(ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal) throws ScmException
Create directory/directories in the repository.- Specified by:
mkdirin interfaceScmProvider- Parameters:
repository- TODOfileSet- TODOmessage- TODOcreateInLocal- TODO- Returns:
- TODO
- Throws:
ScmException- if any
-
info
public InfoScmResult info(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Specified by:
infoin interfaceScmProvider- 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
-
remoteInfo
public RemoteInfoScmResult remoteInfo(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Specified by:
remoteInfoin interfaceScmProvider- 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- if any
-
-