Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.CloneCommand.call()


    log("Cloning repository " + uri);
   
    CloneCommand clone = Git.cloneRepository();
    try {
      clone.setURI(uri).setDirectory(destination).setBranch(branch).setBare(bare);
      clone.call().getRepository().close();
    } catch (Exception e) {
      log("Could not clone repository: " + e, e, Project.MSG_ERR);
      throw new BuildException("Could not clone repository: " + e.getMessage(), e);
    }
  }
View Full Code Here


{
   public static Git clone(final DirectoryResource dir, final String repoUri) throws GitAPIException
   {
      CloneCommand clone = Git.cloneRepository().setURI(repoUri)
               .setDirectory(dir.getUnderlyingResourceObject());
      Git git = clone.call();
      return git;
   }

   public static Git git(final DirectoryResource dir) throws IOException
   {
View Full Code Here

   @Override
   public Git clone(final DirectoryResource dir, final String repoUri) throws GitAPIException
   {
      CloneCommand clone = Git.cloneRepository().setURI(repoUri)
               .setDirectory(dir.getUnderlyingResourceObject());
      Git git = clone.call();
      return git;
   }

   @Override
   public Git git(final DirectoryResource dir) throws IOException
View Full Code Here

{
   public static Git clone(final DirectoryResource dir, final String repoUri) throws GitAPIException
   {
      CloneCommand clone = Git.cloneRepository().setURI(repoUri)
               .setDirectory(dir.getUnderlyingResourceObject());
      Git git = clone.call();
      return git;
   }

   public static Git git(final DirectoryResource dir) throws IOException
   {
View Full Code Here

        branchesToClone.add(name);
      }
      clone.setBranchesToClone(branchesToClone);
      clone.setURI(fromUrl);
      clone.setDirectory(folder);
      Git git = clone.call();

      // fetch tags
      FetchCommand fetch  = git.fetch();
      fetch.setRefSpecs(new RefSpec("+refs/tags/*:refs/tags/*"));
      fetch.call();
 
View Full Code Here

      clone.setURI(fromUrl);
      clone.setDirectory(folder);
      if (credentialsProvider != null) {
        clone.setCredentialsProvider(credentialsProvider);
      }
      Repository repository = clone.call().getRepository();

      // Now we have to fetch because CloneCommand doesn't fetch
      // refs/notes nor does it allow manual RefSpec.
      result.createdRepository = true;
      result.fetchResult = fetchRepository(credentialsProvider, repository);
View Full Code Here

                    CloneCommand gitCommand = Git.cloneRepository()
                            .setURI(gitUrl)
                            .setDirectory(workingDir)
                            .setProgressMonitor(new TextProgressMonitor())
                            .setCredentialsProvider(user);
                    git = gitCommand.call();
                }
            } else {
                git = Git.cloneRepository()
                        .setURI(gitUrl)
                        .setDirectory(workingDir)
View Full Code Here

{
   public static Git clone(final DirectoryResource dir, final String repoUri) throws IOException
   {
      CloneCommand clone = Git.cloneRepository().setURI(repoUri)
               .setDirectory(dir.getUnderlyingResourceObject());
      Git git = clone.call();
      return git;
   }

   public static Git git(final DirectoryResource dir) throws IOException
   {
View Full Code Here

        branchesToClone.add(name);
      }
      clone.setBranchesToClone(branchesToClone);
      clone.setURI(fromUrl);
      clone.setDirectory(folder);
      Git git = clone.call();

      // fetch tags
      FetchCommand fetch  = git.fetch();
      fetch.setRefSpecs(new RefSpec("+refs/tags/*:refs/tags/*"));
      fetch.call();
 
View Full Code Here

      clone.setURI(fromUrl);
      clone.setDirectory(folder);
      if (credentialsProvider != null) {
        clone.setCredentialsProvider(credentialsProvider);
      }
      Repository repository = clone.call().getRepository();

      // Now we have to fetch because CloneCommand doesn't fetch
      // refs/notes nor does it allow manual RefSpec.
      result.createdRepository = true;
      result.fetchResult = fetchRepository(credentialsProvider, repository);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.