Package org.eclipse.jgit.revwalk

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


  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

  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

  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

    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

        aTree = null;
        bTree = null;

      } else {
        if (patchList.getOldId() != null) {
          aTree = rw.parseTree(patchList.getOldId());
        } else {
          final RevCommit p = bCommit.getParent(0);
          rw.parseHeaders(p);
          aTree = p.getTree();
        }
View Full Code Here

    final DirCache dc = DirCache.newInCore();
    final DirCacheBuilder b = dc.builder();
    b.addTree(new byte[0], // no prefix path
        DirCacheEntry.STAGE_0, // standard stage
        pdb.newObjectReader(), rw.parseTree(branch.getObjectId()));
    b.finish();
    return dc;
  }

  private static void logAndThrowSubmoduleException(final String errorMsg,
View Full Code Here

    final Repository db = update.getRepository();

    reader = db.newObjectReader();
    inserter = db.newObjectInserter();
    final RevWalk rw = new RevWalk(reader);
    final RevTree tree = revision != null ? rw.parseTree(revision) : null;
    newTree = readTree(tree);
    return new BatchMetaDataUpdate() {
      AnyObjectId src = revision;
      AnyObjectId srcTree = tree;
View Full Code Here

        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

    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

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.