Package org.eclipse.egit.github.core

Examples of org.eclipse.egit.github.core.Tree


              .format("Existing ref {0} points to a {1} ({2}) instead of a commmit",
                  ref.getRef(), ref.getObject().getType(),
                  ref.getObject().getSha()));

    // Write tree
    Tree tree;
    try {
      int size = entries.size();
      if (size != 1)
        info(MessageFormat.format(
            "Creating tree with {0} blob entries", size));
      else
        info("Creating tree with 1 blob entry");
      String baseTree = null;
      if (merge && ref != null) {
        Tree currentTree = service.getCommit(repository,
            ref.getObject().getSha()).getTree();
        if (currentTree != null)
          baseTree = currentTree.getSha();
        info(MessageFormat.format("Merging with tree {0}", baseTree));
      }
      if (!dryRun)
        tree = service.createTree(repository, entries, baseTree);
      else
        tree = new Tree();
    } catch (IOException e) {
      throw new MojoExecutionException("Error creating tree: "
          + getExceptionMessage(e), e);
    }
View Full Code Here


      log.debug("Dry run mode, skip deploy.");
      return;
    }

    // Write tree
    Tree tree = createTree(service, repository, ref, entries);

    // Build commit
    Commit commit = new Commit();
    commit.setMessage(message != null ? message : "GitHubWagon: Deploying OpooPress to GitHub Pages.");
    commit.setTree(tree);
View Full Code Here

      int size = entries.size();
      log.info(String.format("Creating tree with %s blob entries", size));

      String baseTree = null;
      if (merge && ref != null) {
        Tree currentTree = service.getCommit(repository, ref.getObject().getSha()).getTree();
        if (currentTree != null){
          baseTree = currentTree.getSha();
        }
        log.info(MessageFormat.format("Merging with tree {0}", baseTree));
      }
     
      return service.createTree(repository, entries, baseTree);
View Full Code Here

              .format("Existing ref {0} points to a {1} ({2}) instead of a commmit",
                  ref.getRef(), ref.getObject().getType(),
                  ref.getObject().getSha()));

    // Write tree
    Tree tree;
    try {
      int size = entries.size();
      if (size != 1)
        info(MessageFormat.format(
            "Creating tree with {0} blob entries", size));
      else
        info("Creating tree with 1 blob entry");
      String baseTree = null;
      if (merge && ref != null) {
        Tree currentTree = service.getCommit(repository,
            ref.getObject().getSha()).getTree();
        if (currentTree != null)
          baseTree = currentTree.getSha();
        info(MessageFormat.format("Merging with tree {0}", baseTree));
      }
      if (!dryRun)
        tree = service.createTree(repository, entries, baseTree);
      else
        tree = new Tree();
    } catch (IOException e) {
      throw new MojoExecutionException("Error creating tree: "
          + getExceptionMessage(e), e);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.egit.github.core.Tree

Copyright © 2018 www.massapicom. 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.