Package org.eclipse.jgit.revwalk

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


            MessageFormat.format(JGitText.get().cannotRead, ref),
            e);
      }
      RevWalk rw = new RevWalk(repo);
      try {
        commit = rw.parseCommit(commitId);
      } catch (IOException e) {
        throw new JGitInternalException(
            MessageFormat.format(
            JGitText.get().cannotReadCommit, commitId.toString()),
            e);
View Full Code Here


      if (startPointFullName == null) {
        String baseCommit;
        if (startCommit != null)
          baseCommit = startCommit.getShortMessage();
        else {
          RevCommit commit = revWalk.parseCommit(repo
              .resolve(startPoint));
          baseCommit = commit.getShortMessage();
        }
        if (exists)
          refLogMessage = "branch: Reset start-point to commit "
View Full Code Here

        throw new RefNotFoundException(MessageFormat.format(JGitText
            .get().refNotResolved, name));

      RevWalk revWalk = new RevWalk(repo);
      AnyObjectId headId = headRef.getObjectId();
      RevCommit headCommit = headId == null ? null : revWalk
          .parseCommit(headId);
      RevCommit newCommit = revWalk.parseCommit(branch);
      RevTree headTree = headCommit == null ? null : headCommit.getTree();
      DirCacheCheckout dco;
      DirCache dc = repo.lockDirCache();
View Full Code Here

      RevWalk revWalk = new RevWalk(repo);
      AnyObjectId headId = headRef.getObjectId();
      RevCommit headCommit = headId == null ? null : revWalk
          .parseCommit(headId);
      RevCommit newCommit = revWalk.parseCommit(branch);
      RevTree headTree = headCommit == null ? null : headCommit.getTree();
      DirCacheCheckout dco;
      DirCache dc = repo.lockDirCache();
      try {
        dco = new DirCacheCheckout(repo, headTree, dc,
View Full Code Here

        treeWalk.setFilter(PathFilterGroup.createFromStrings(paths));
      try {
        if (isCheckoutIndex())
          checkoutPathsFromIndex(treeWalk, dc);
        else {
          RevCommit commit = revWalk.parseCommit(getStartPoint());
          checkoutPathsFromCommit(treeWalk, dc, commit);
        }
      } finally {
        treeWalk.release();
      }
View Full Code Here

      tw.setFilter(TreeFilter.ANY_DIFF);
      tw.setRecursive(true);

      ObjectId start = db.resolve(Constants.HEAD);
      startId = or.abbreviate(start);
      rw.markStart(rw.parseCommit(start));
      for (;;) {
        final RevCommit c = rw.next();
        if (c == null)
          break;
        commits++;
View Full Code Here

      String line;
      while ((line = br.readLine()) != null) {
        final String[] parts = line.split("[ \t]{1,}"); //$NON-NLS-1$
        final ObjectId oldId = ObjectId.fromString(parts[0]);
        try {
          rw.parseCommit(oldId);
          // We have it already. Don't rewrite it.
          continue;
        } catch (MissingObjectException mue) {
          // Fall through and rewrite it.
        }
View Full Code Here

      try {
        final RevWalk rw = new RevWalk(reader);
        final RevCommit c;
        final TreeWalk tw;

        c = rw.parseCommit(ObjectId.fromString(patchSet.getRevision().get()));
        if (side == 0) {
          fromCommit = c;
          suffix = "new";

        } else if (1 <= side && side - 1 < c.getParentCount()) {
View Full Code Here

        if (side == 0) {
          fromCommit = c;
          suffix = "new";

        } else if (1 <= side && side - 1 < c.getParentCount()) {
          fromCommit = rw.parseCommit(c.getParent(side - 1));
          if (c.getParentCount() == 1) {
            suffix = "old";
          } else {
            suffix = "old" + side;
          }
View Full Code Here

            if (null != masterBranch)
            {
                try
                {
                    masterCommit = walk.parseCommit(masterBranch);
                }
                catch (MissingObjectException e)
                {
                    //ignore
                }
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.