Class PerforceScmProvider
- java.lang.Object
-
- org.apache.maven.scm.provider.AbstractScmProvider
-
- org.apache.maven.scm.provider.perforce.PerforceScmProvider
-
- All Implemented Interfaces:
ScmProvider
public class PerforceScmProvider extends AbstractScmProvider
- Author:
- Trygve Laugstøl , mperham
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_CLIENTSPEC_PROPERTY-
Fields inherited from interface org.apache.maven.scm.provider.ScmProvider
ROLE
-
-
Constructor Summary
Constructors Constructor Description PerforceScmProvider()
-
Method Summary
-
Methods inherited from class org.apache.maven.scm.provider.AbstractScmProvider
add, add, add, addListener, blame, blame, branch, 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, export, export, export, export, export, export, getLogger, getScmSpecificFilename, info, list, list, list, makeProviderScmRepository, mkdir, mkdir, remoteInfo, remove, sanitizeTagName, status, tag, tag, tag, unedit, update, update, update, update, update, update, update, update, update, update, update, update, validateScmUrl, validateTagName
-
-
-
-
Field Detail
-
DEFAULT_CLIENTSPEC_PROPERTY
public static final String DEFAULT_CLIENTSPEC_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
requiresEditMode
public boolean requiresEditMode()
Description copied from class:AbstractScmProvider- Specified by:
requiresEditModein interfaceScmProvider- Overrides:
requiresEditModein classAbstractScmProvider
-
makeProviderScmRepository
public ScmProviderRepository makeProviderScmRepository(String scmSpecificUrl, char delimiter) throws ScmRepositoryException
- Throws:
ScmRepositoryException
-
getScmType
public String getScmType()
-
changelog
protected ChangeLogScmResult changelog(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Overrides:
changelogin classAbstractScmProvider- Throws:
ScmException
-
add
public AddScmResult add(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters params) throws ScmException
- Overrides:
addin classAbstractScmProvider- Throws:
ScmException
-
remove
protected RemoveScmResult remove(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters params) throws ScmException
- Overrides:
removein classAbstractScmProvider- Throws:
ScmException
-
checkin
protected CheckInScmResult checkin(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters params) throws ScmException
- Overrides:
checkinin classAbstractScmProvider- Throws:
ScmException
-
checkout
protected CheckOutScmResult checkout(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters params) throws ScmException
- Overrides:
checkoutin classAbstractScmProvider- Throws:
ScmException
-
diff
protected DiffScmResult diff(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters params) throws ScmException
- Overrides:
diffin classAbstractScmProvider- Throws:
ScmException
-
edit
protected EditScmResult edit(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters params) throws ScmException
- Overrides:
editin classAbstractScmProvider- Throws:
ScmException
-
login
protected LoginScmResult login(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters params) throws ScmException
- Overrides:
loginin classAbstractScmProvider- Throws:
ScmException
-
status
protected StatusScmResult status(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters params) throws ScmException
- Overrides:
statusin classAbstractScmProvider- Throws:
ScmException
-
tag
protected TagScmResult tag(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters params) throws ScmException
- Overrides:
tagin classAbstractScmProvider- Throws:
ScmException
-
unedit
protected UnEditScmResult unedit(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters params) throws ScmException
- Overrides:
uneditin classAbstractScmProvider- Throws:
ScmException
-
update
protected UpdateScmResult update(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters params) throws ScmException
- Overrides:
updatein classAbstractScmProvider- Throws:
ScmException
-
blame
protected BlameScmResult blame(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters params) throws ScmException
- Overrides:
blamein classAbstractScmProvider- Throws:
ScmException
-
createP4Command
public static org.codehaus.plexus.util.cli.Commandline createP4Command(PerforceScmProviderRepository repo, File workingDir)
-
getCanonicalRepoPath
public static String getCanonicalRepoPath(String repoPath)
Given a path like "//depot/foo/bar", returns the proper path to include everything beneath it. //depot/foo/bar -> //depot/foo/bar/... //depot/foo/bar/ -> //depot/foo/bar/... //depot/foo/bar/... -> //depot/foo/bar/...- Parameters:
repoPath-- Returns:
-
createClientspec
public static String createClientspec(ScmLogger logger, PerforceScmProviderRepository repo, File workDir, String repoPath)
-
getClientspecName
public static String getClientspecName(ScmLogger logger, PerforceScmProviderRepository repo, File workDir)
-
getRepoPath
public static String getRepoPath(ScmLogger log, PerforceScmProviderRepository repo, File basedir)
This is a "safe" method which handles cases where repo.getPath() is not actually a valid Perforce depot location. This is a frequent error due to branches and directory naming where dir name != artifactId.- Parameters:
log- the logging object to userepo- the Perforce repobasedir- the base directory we are operating in. If pom.xml exists in this directory, this method will verifyrepo.getPath()/pom.xml
==p4 where basedir/pom.xml
- Returns:
- repo.getPath if it is determined to be accurate. The p4 where location otherwise.
-
isLive
public static boolean isLive()
-
-