Examples of parseTree()


Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

        IncorrectObjectTypeException, CorruptObjectException, IOException {
      if (path == null || within == null) {
        return null;
      }
      final RevWalk rw = new RevWalk(reader);
      final RevTree tree = rw.parseTree(within);
      return TreeWalk.forPath(reader, path, tree);
    }
  }
}
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

    ObjectReader or = db.newObjectReader();
    try {
      final MutableObjectId id = new MutableObjectId();
      RevWalk rw = new RevWalk(or);
      TreeWalk tw = new TreeWalk(or);
      tw.reset(rw.parseTree(db.resolve(Constants.HEAD)));
      tw.setRecursive(true);

      while (tw.next()) {
        FileMode fm = tw.getFileMode(0);
        if (!FileMode.REGULAR_FILE.equals(fm)
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

  public List<DiffEntry> scan(AnyObjectId a, AnyObjectId b)
      throws IOException {
    assertHaveRepository();

    RevWalk rw = new RevWalk(reader);
    return scan(rw.parseTree(a), rw.parseTree(b));
  }

  /**
   * Determine the differences between two trees.
   *
 
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

  public List<DiffEntry> scan(AnyObjectId a, AnyObjectId b)
      throws IOException {
    assertHaveRepository();

    RevWalk rw = new RevWalk(reader);
    return scan(rw.parseTree(a), rw.parseTree(b));
  }

  /**
   * Determine the differences between two trees.
   *
 
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

    try {
      treeWalk.addTree(new DirCacheIterator(repo.readDirCache()));
      ObjectId headID = repo.resolve(Constants.HEAD);
      if (headID != null) {
        revWalk = new RevWalk(repo);
        treeWalk.addTree(revWalk.parseTree(headID));
        revWalk.dispose();
        revWalk = null;
      }

      treeWalk.setFilter(TreeFilter.ANY_DIFF);
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

  private boolean inHead(String path) throws IOException {
    ObjectId headId = db.resolve(Constants.HEAD);
    RevWalk rw = new RevWalk(db);
    TreeWalk tw = null;
    try {
      tw = TreeWalk.forPath(db, path, rw.parseTree(headId));
      return tw != null;
    } finally {
      rw.release();
      rw.dispose();
      if (tw != null)
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

      try {
        final MutableObjectId idBuf = new MutableObjectId();
        final ObjectReader reader = walk.getObjectReader();
        final RevWalk rw = new RevWalk(walk.getObjectReader());

        walk.reset(rw.parseTree(tree));
        if (!paths.isEmpty())
          walk.setFilter(PathFilterGroup.createFromStrings(paths));

        while (walk.next()) {
          final String name = pfx + walk.getPathString();
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

          ixMerger.setCommitNames(new String[] { "stashed HEAD",
              "HEAD", "stashed index" });
          ixMerger.setBase(stashHeadCommit);
          boolean ok = ixMerger.merge(headCommit, stashIndexCommit);
          if (ok) {
            resetIndex(revWalk
                .parseTree(ixMerger.getResultTreeId()));
          } else {
            throw new StashApplyFailureException(
                JGitText.get().stashApplyConflict);
          }
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

          untrackedMerger.setBase(stashHeadCommit);
          boolean ok = untrackedMerger.merge(headCommit,
              untrackedCommit);
          if (ok)
            try {
              RevTree untrackedTree = revWalk
                  .parseTree(untrackedMerger
                      .getResultTreeId());
              resetUntracked(untrackedTree);
            } catch (CheckoutConflictException e) {
              throw new StashApplyFailureException(
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()

  public List<DiffEntry> scan(AnyObjectId a, AnyObjectId b)
      throws IOException {
    assertHaveRepository();

    RevWalk rw = new RevWalk(reader);
    RevTree aTree = a != null ? rw.parseTree(a) : null;
    RevTree bTree = b != null ? rw.parseTree(b) : null;
    return scan(aTree, bTree);
  }

  /**
 
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.