org.jclouds.scriptbuilder.statements.git
Class CloneGitRepo

java.lang.Object
  extended by org.jclouds.scriptbuilder.statements.git.CloneGitRepo
All Implemented Interfaces:
Statement

public class CloneGitRepo
extends Object
implements Statement

Clones a gitRepoAndRef into a newly created directory, creates remote-tracking branches for each branch in the cloned gitRepoAndRef (visible using git branch -r), and creates and checks out an initial branch that is forked from the cloned gitRepoAndRef's currently active branch. PWD is set to the directory being checked out.


Nested Class Summary
static class CloneGitRepo.Builder
           
 
Field Summary
protected  com.google.common.base.Optional<String> directory
           
protected  GitRepoAndRef gitRepoAndRef
           
 
Constructor Summary
protected CloneGitRepo(GitRepoAndRef gitRepoAndRef, com.google.common.base.Optional<String> directory)
           
 
Method Summary
static CloneGitRepo.Builder builder()
           
 boolean equals(Object obj)
          
 Iterable<String> functionDependencies(OsFamily arg0)
          
 com.google.common.base.Optional<String> getDirectory()
          The name of a new directory to clone into.
 GitRepoAndRef getGitRepoAndRef()
          The coordinates to checkout
 int hashCode()
          
 String render(OsFamily arg0)
          
 CloneGitRepo.Builder toBuilder()
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

gitRepoAndRef

protected final GitRepoAndRef gitRepoAndRef

directory

protected final com.google.common.base.Optional<String> directory
Constructor Detail

CloneGitRepo

protected CloneGitRepo(GitRepoAndRef gitRepoAndRef,
                       com.google.common.base.Optional<String> directory)
Method Detail

builder

public static CloneGitRepo.Builder builder()

toBuilder

public CloneGitRepo.Builder toBuilder()

getGitRepoAndRef

public GitRepoAndRef getGitRepoAndRef()
The coordinates to checkout


getDirectory

public com.google.common.base.Optional<String> getDirectory()
The name of a new directory to clone into. The "humanish" part of the source gitRepoAndRef is used if no directory is explicitly given (repo for /path/to/repo.git and foo for host.xz:foo/.git).


hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

functionDependencies

public Iterable<String> functionDependencies(OsFamily arg0)

Specified by:
functionDependencies in interface Statement

render

public String render(OsFamily arg0)

Specified by:
render in interface Statement

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.