org.apache.maven.scm.provider.git.gitexe.command.checkout
Class GitCheckOutCommand

java.lang.Object
  extended by org.apache.maven.scm.command.AbstractCommand
      extended by org.apache.maven.scm.command.checkout.AbstractCheckOutCommand
          extended by org.apache.maven.scm.provider.git.gitexe.command.checkout.GitCheckOutCommand
All Implemented Interfaces:
Command, GitCommand

public class GitCheckOutCommand
extends AbstractCheckOutCommand
implements GitCommand

Version:
$Id: GitCheckOutCommand.java 1241328 2012-02-07 02:10:51Z hboutemy $
Author:
Mark Struberg

Field Summary
 
Fields inherited from interface org.apache.maven.scm.command.Command
ROLE
 
Constructor Summary
GitCheckOutCommand()
           
 
Method Summary
static Commandline createCommandLine(GitScmProviderRepository repository, File workingDirectory, ScmVersion version)
           
protected  CheckOutScmResult executeCheckOutCommand(ScmProviderRepository repo, ScmFileSet fileSet, ScmVersion version, boolean recursive)
          For git, the given repository is a remote one.
 
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
 
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.command.Command
execute, getLogger, setLogger
 

Constructor Detail

GitCheckOutCommand

public GitCheckOutCommand()
Method Detail

executeCheckOutCommand

protected CheckOutScmResult executeCheckOutCommand(ScmProviderRepository repo,
                                                   ScmFileSet fileSet,
                                                   ScmVersion version,
                                                   boolean recursive)
                                            throws ScmException
For git, the given repository is a remote one. We have to clone it first if the working directory does not contain a git repo yet, otherwise we have to git-pull it.

TODO We currently assume a '.git' directory, so this does not work for --bare repos Execute Check out command line.

Specified by:
executeCheckOutCommand in class AbstractCheckOutCommand
Parameters:
repo - not null
fileSet - not null
version - not null
recursive - true if recursive check out is wanted, false otherwise.
Returns:
the checkout result
Throws:
ScmException - if any

createCommandLine

public static Commandline createCommandLine(GitScmProviderRepository repository,
                                            File workingDirectory,
                                            ScmVersion version)


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.