Package org.apache.maven.scm.manager
Class ScmManagerStub
- java.lang.Object
-
- org.apache.maven.scm.manager.ScmManagerStub
-
- All Implemented Interfaces:
ScmManager
public class ScmManagerStub extends Object implements ScmManager
Stub implementation of ScmManager 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 ScmManagerStub()Creates a new stub with stub repository and provider, and empty list of messages.
-
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.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.ChangeLogScmResultchangeLog(ChangeLogScmRequest request)Returns the changes that have happend 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 happend 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 happend 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 happend in the source control system between two tags.ChangeLogScmResultchangeLog(ScmRepository repository, ScmFileSet fileSet, ScmVersion startRevision, ScmVersion endRevision, String datePattern)Returns the changes that have happend 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, CommandParameters commandParameters)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 repository, ScmFileSet fileSet, 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 repository, ScmFileSet fileSet, ScmVersion version, boolean recursive)Create a copy of the repository on your local machine.DiffScmResultdiff(ScmRepository repository, ScmFileSet fileSet, 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 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.List<String>getMessages()Get the messages to return in validateScmRepository.ScmProvidergetProviderByRepository(ScmRepository repository)ScmProvidergetProviderByType(String providerType)Returns the default provider registered for this providerType or a specific implementation if the 'maven.scm.provider.providerType.implementation' system property is defined.ScmProvidergetProviderByUrl(String scmUrl)ScmProvidergetScmProvider()ScmRepositorygetScmRepository()ListScmResultlist(ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version)List each element (files and directories) of fileSet as they exist in the repository.Optional<ScmRepository>makeProviderScmRepository(File path)Generate aScmRepositoryfor a given checkout (working) directory.ScmRepositorymakeProviderScmRepository(String providerType, File path)Generate aScmRepositoryfor a specific provider and a given checkout (working) directoryScmRepositorymakeScmRepository(String scmUrl)Generate aScmRepositoryfrom an SCM URL.MkdirScmResultmkdir(ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal)Create new directory/directories in the repository.RemoveScmResultremove(ScmRepository repository, ScmFileSet fileSet, String message)Removes the given files from the source control system.voidsetMessages(List<String> messages)Set the messages to return in validateScmRepository.voidsetScmProvider(String providerType, ScmProvider provider)Set a provider to be used for a type of SCM.voidsetScmProvider(ScmProvider scmProvider)voidsetScmProviderImplementation(String providerType, String providerImplementation)Set the provider implementation.voidsetScmRepository(ScmRepository scmRepository)StatusScmResultstatus(ScmRepository repository, ScmFileSet fileSet)Returns the status of the files in the source control system.TagScmResulttag(ScmRepository repository, ScmFileSet fileSet, String tagName)Tag (or label in some systems) will tag the source file with a certain tag.TagScmResulttag(ScmRepository repository, ScmFileSet fileSet, String tagName, String message)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.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 datePattern)Updates the copy on the local machine with the changes in the repository.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, Date lastUpdate)Updates the copy on the local machine with the changes in the repository.UpdateScmResultupdate(ScmRepository repository, ScmFileSet fileSet, Date lastUpdate, String datePattern)Updates the copy on the local machine with the changes in the repository.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>validateScmRepository(String scmUrl)Returns the same list as getMessages()
-
-
-
Constructor Detail
-
ScmManagerStub
public ScmManagerStub()
Creates a new stub with stub repository and provider, and empty list of messages.
-
-
Method Detail
-
setScmProvider
public void setScmProvider(ScmProvider scmProvider)
-
getScmProvider
public ScmProvider getScmProvider()
-
setScmProvider
public void setScmProvider(String providerType, ScmProvider provider)
Set a provider to be used for a type of SCM. If there was already a designed provider for that type it will be replaced.- Specified by:
setScmProviderin interfaceScmManager- Parameters:
providerType- the type of SCM, e.g.svn,gitprovider- the provider that will be used for that SCM type
-
setScmProviderImplementation
public void setScmProviderImplementation(String providerType, String providerImplementation)
Set the provider implementation.- Specified by:
setScmProviderImplementationin interfaceScmManager- Parameters:
providerType- the provider type, e.g.gitproviderImplementation- the provider implementation (the role-hint of the provider), e.g.git,svn
-
setScmRepository
public void setScmRepository(ScmRepository scmRepository)
-
getScmRepository
public ScmRepository getScmRepository()
-
setMessages
public void setMessages(List<String> messages)
Set the messages to return in validateScmRepository.- Parameters:
messages-ListofStringobjects
-
getMessages
public List<String> getMessages()
Get the messages to return in validateScmRepository.- Returns:
ListofStringobjects
-
makeScmRepository
public ScmRepository makeScmRepository(String scmUrl) throws ScmRepositoryException, NoSuchScmProviderException
Generate aScmRepositoryfrom an SCM URL.- Specified by:
makeScmRepositoryin interfaceScmManager- Parameters:
scmUrl- the scm url- Returns:
- the scm repository (never
null) - Throws:
ScmRepositoryException- if an error occurs in the scm repository constructionNoSuchScmProviderException- if the provider doesn't exist
-
makeProviderScmRepository
public ScmRepository makeProviderScmRepository(String providerType, File path) throws ScmRepositoryException, UnknownRepositoryStructure, NoSuchScmProviderException
Generate aScmRepositoryfor a specific provider and a given checkout (working) directory- Specified by:
makeProviderScmRepositoryin interfaceScmManagerpath- the checkout (working) directory- Returns:
- the SCM repository (never
null) - Throws:
ScmRepositoryException- if the provider does not recognize the directoryUnknownRepositoryStructure- if the provider does not support this way of generating aScmRepositoryNoSuchScmProviderException- if the given provider type does not have a provider implementation bound
-
makeProviderScmRepository
public Optional<ScmRepository> makeProviderScmRepository(File path)
Description copied from interface:ScmManagerGenerate aScmRepositoryfor a given checkout (working) directory. Determines a suitable SCM provider for the directory by looking for SCM specific metadata files.- Specified by:
makeProviderScmRepositoryin interfaceScmManager- Parameters:
path- the checkout (working) directory- Returns:
- the
ScmRepositoryor empty if no suitable provider found
-
validateScmRepository
public List<String> validateScmRepository(String scmUrl)
Returns the same list as getMessages()- Specified by:
validateScmRepositoryin interfaceScmManager- Parameters:
scmUrl- ignored- Returns:
ListofStringobjects, the same list returned by getMessages()
-
getProviderByUrl
public ScmProvider getProviderByUrl(String scmUrl) throws ScmRepositoryException, NoSuchScmProviderException
- Specified by:
getProviderByUrlin interfaceScmManager- Throws:
ScmRepositoryExceptionNoSuchScmProviderException
-
getProviderByType
public ScmProvider getProviderByType(String providerType) throws NoSuchScmProviderException
Returns the default provider registered for this providerType or a specific implementation if the 'maven.scm.provider.providerType.implementation' system property is defined. For example: maven.scm.provider.git.implementation=git.- Specified by:
getProviderByTypein interfaceScmManager- Parameters:
providerType- the provider type (git, svn...)- Returns:
- the scm provider
- Throws:
NoSuchScmProviderException- if the provider doesn't exist
-
getProviderByRepository
public ScmProvider getProviderByRepository(ScmRepository repository) throws NoSuchScmProviderException
- Specified by:
getProviderByRepositoryin interfaceScmManager- Throws:
NoSuchScmProviderException
-
add
public AddScmResult add(ScmRepository repository, ScmFileSet fileSet) throws ScmException
Adds the given files to the source control system.- Specified by:
addin interfaceScmManager- Parameters:
repository- the source control systemfileSet- the files to be added- Returns:
- an
AddScmResultthat contains the file paths (relative tofileSet.getBasedir()) 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 interfaceScmManager- 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 file paths (relative tofileSet.getBasedir()) 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 interfaceScmManager- 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 interfaceScmManager- 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
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, ScmBranch branch) throws ScmException
Returns the changes that have happend in the source control system in a certain period of time. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmManager- 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 happend in the source control system in a certain period of time. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmManager- 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 request) throws ScmException
Returns the changes that have happend in the source control system in a certain period of time. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmManager- Parameters:
request- 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 happend in the source control system between two tags. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmManager- 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 happend in the source control system between two tags. This can be adding, removing, updating, ... of files.- Specified by:
changeLogin interfaceScmManager- 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 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 interfaceScmManager- 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:
- a
CheckInScmResultthat contains the file paths (relative tofileSet.getBasedir()) that have been checked in - 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 interfaceScmManager- 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:
- a
CheckInScmResultthat contains the file paths (relative tofileSet.getBasedir()) that have been checked in - Throws:
ScmException- if any
-
checkIn
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, CommandParameters commandParameters) throws ScmException
Description copied from interface:ScmManagerSave 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 interfaceScmManager- Parameters:
repository- the source control systemfileSet- the files to check in (sometimes called commit)commandParameters- parameters for the command, such as commit message and whether to sign the commit.CommandParameters- Returns:
- a
CheckInScmResultthat contains the file paths (relative tofileSet.getBasedir()) that have been checked in - 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 interfaceScmManager- 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 interfaceScmManager- 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 repository, ScmFileSet fileSet, boolean recursive) throws ScmException
Create a copy of the repository on your local machine.- Specified by:
checkOutin interfaceScmManager- Parameters:
repository- the source control systemfileSet- the files are copied to theScmFileSet.getBasedir()locationrecursive- whether to check out recursively- Returns:
- TODO
- Throws:
ScmException- if any
-
checkOut
public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, boolean recursive) throws ScmException
Create a copy of the repository on your local machine.- Specified by:
checkOutin interfaceScmManager- Parameters:
repository- the source control systemfileSet- 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
-
diff
public DiffScmResult diff(ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, ScmVersion endVersion) throws ScmException
Create a diff between two branch/tag/revision.- Specified by:
diffin interfaceScmManager- Parameters:
repository- the source control systemfileSet- the files are copied to theScmFileSet.getBasedir()locationstartVersion- the start branch/tag/revisionendVersion- the end branch/tag/revision- Returns:
- TODO
- Throws:
ScmException- if any
-
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 interfaceScmManager- 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) throws ScmException
Create an exported copy of the repository on your local machine.- Specified by:
exportin interfaceScmManager- 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 interfaceScmManager- 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, String outputDirectory) throws ScmException
Create an exported copy of the repository on your local machine.- Specified by:
exportin interfaceScmManager- Parameters:
repository- the source control systemfileSet- the files are copied to theScmFileSet.getBasedir()locationoutputDirectory- the directory where the export will be stored- 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 interfaceScmManager- 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, ScmVersion version) throws ScmException
List each element (files and directories) of fileSet as they exist in the repository.- Specified by:
listin interfaceScmManager- 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 interfaceScmManager- Parameters:
repository- the source control systemfileSet- the files to be removedmessage- TODO- Returns:
- a
RemoveScmResultthat contains the file paths (relative tofileSet.getBasedir()) that have been removed - 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 interfaceScmManager- 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 tagName) throws ScmException
Tag (or label in some systems) will tag the source file with a certain tag.- Specified by:
tagin interfaceScmManager- 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 files- Returns:
- TODO
- Throws:
ScmException- if any
-
tag
public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tagName, String message) throws ScmException
Tag (or label in some systems) will tag the source file with a certain tag.- Specified by:
tagin interfaceScmManager- 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 filesmessage- the commit message used for the tag creation- 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 ofScmManager.edit(org.apache.maven.scm.repository.ScmRepository, org.apache.maven.scm.ScmFileSet). It makes the file read-only again.- Specified by:
uneditin interfaceScmManager- Parameters:
repository- the source control systemfileSet- the files to make uneditable- 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 interfaceScmManager- 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 interfaceScmManager- 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 interfaceScmManager- 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 interfaceScmManager- 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, String datePattern) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmManager- Parameters:
repository- the source control systemfileSet- location of your local copydatePattern- 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, String datePattern) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmManager- 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, Date lastUpdate) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmManager- Parameters:
repository- the source control systemfileSet- location of your local copylastUpdate- TODO- 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 interfaceScmManager- 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, Date lastUpdate, String datePattern) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmManager- Parameters:
repository- the source control systemfileSet- location of your local copylastUpdate- 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, ScmVersion version, Date lastUpdate, String datePattern) throws ScmException
Updates the copy on the local machine with the changes in the repository.- Specified by:
updatein interfaceScmManager- 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
-
blame
public BlameScmResult blame(ScmRepository repository, ScmFileSet fileSet, String filename) throws ScmException
Returns the blame of specified file.- Specified by:
blamein interfaceScmManager- 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 interfaceScmManager- Parameters:
blameScmRequest- TODO- Returns:
- blame for specified file
- Throws:
ScmException- if any
-
mkdir
public MkdirScmResult mkdir(ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal) throws ScmException
Create new directory/directories in the repository.- Specified by:
mkdirin interfaceScmManager- Parameters:
repository- TODOfileSet- TODOmessage- TODOcreateInLocal- TODO- Returns:
- TODO
- Throws:
ScmException- if any
-
-