Class PerforceCheckOutCommand
java.lang.Object
org.apache.maven.scm.command.AbstractCommand
org.apache.maven.scm.command.checkout.AbstractCheckOutCommand
org.apache.maven.scm.provider.perforce.command.checkout.PerforceCheckOutCommand
- All Implemented Interfaces:
Command
,PerforceCommand
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.codehaus.plexus.util.cli.Commandline
createCommandLine
(PerforceScmProviderRepository repo, File workingDirectory, ScmVersion version, String specname) protected CheckOutScmResult
executeCheckOutCommand
(ScmProviderRepository repo, ScmFileSet files, ScmVersion version, boolean recursive, boolean shallow) Check out the depot code atrepo.getPath()
into the target directory atfiles.getBasedir
.private int
getLastChangelist
(PerforceScmProviderRepository repo, File workingDirectory, String specname) Methods inherited from class org.apache.maven.scm.command.checkout.AbstractCheckOutCommand
executeCheckOutCommand, executeCommand
Methods inherited from class org.apache.maven.scm.command.AbstractCommand
execute, getLogger, setLogger
-
Field Details
-
actualLocation
-
-
Constructor Details
-
PerforceCheckOutCommand
public PerforceCheckOutCommand()
-
-
Method Details
-
executeCheckOutCommand
protected CheckOutScmResult executeCheckOutCommand(ScmProviderRepository repo, ScmFileSet files, ScmVersion version, boolean recursive, boolean shallow) throws ScmException Check out the depot code atrepo.getPath()
into the target directory atfiles.getBasedir
. Perforce does not support arbitrary checkout of versioned source so we need to set up a well-known clientspec which will hold the required info.1) A clientspec will be created or updated which holds a temporary mapping from the repo path to the target directory. 2) This clientspec is sync'd to pull all the files onto the client
Execute Check out command line.
- Specified by:
executeCheckOutCommand
in classAbstractCheckOutCommand
- Parameters:
repo
- not nullfiles
- not nullversion
- not nullrecursive
-true
if recursive check out is wanted,false
otherwise.shallow
-true
if shallow check out is wanted,false
otherwise.- Returns:
- the checkout result
- Throws:
ScmException
- if any
-
createCommandLine
public static org.codehaus.plexus.util.cli.Commandline createCommandLine(PerforceScmProviderRepository repo, File workingDirectory, ScmVersion version, String specname) -
getLastChangelist
private int getLastChangelist(PerforceScmProviderRepository repo, File workingDirectory, String specname)
-