Examples of parseCommit()


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

    final RevWalk walk = new RevWalk(repo);
    walk.setRetainBody(true);
    try {
      for (ReflogEntry entry : stashEntries)
        try {
          stashCommits.add(walk.parseCommit(entry.getNewId()));
        } catch (IOException e) {
          throw new JGitInternalException(MessageFormat.format(
              JGitText.get().cannotReadCommit, entry.getNewId()),
              e);
        }
View Full Code Here

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

      // get the head commit
      Ref headRef = repo.getRef(Constants.HEAD);
      if (headRef == null)
        throw new NoHeadException(
            JGitText.get().commitOnRepoWithoutHEADCurrentlyNotSupported);
      RevCommit headCommit = revWalk.parseCommit(headRef.getObjectId());

      newHead = headCommit;

      // loop through all refs to be cherry-picked
      for (Ref src : commits) {
View Full Code Here

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

        // get the commit to be cherry-picked
        // handle annotated tags
        ObjectId srcObjectId = src.getPeeledObjectId();
        if (srcObjectId == null)
          srcObjectId = src.getObjectId();
        RevCommit srcCommit = revWalk.parseCommit(srcObjectId);

        // get the parent of the commit to cherry-pick
        if (srcCommit.getParentCount() != 1)
          throw new MultipleParentsNotAllowedException(
              MessageFormat.format(
View Full Code Here

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

      // get the head commit
      Ref headRef = repo.getRef(Constants.HEAD);
      if (headRef == null)
        throw new NoHeadException(
            JGitText.get().commitOnRepoWithoutHEADCurrentlyNotSupported);
      RevCommit headCommit = revWalk.parseCommit(headRef.getObjectId());

      newHead = headCommit;

      // loop through all refs to be reverted
      for (Ref src : commits) {
View Full Code Here

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

        // get the commit to be reverted
        // handle annotated tags
        ObjectId srcObjectId = src.getPeeledObjectId();
        if (srcObjectId == null)
          srcObjectId = src.getObjectId();
        RevCommit srcCommit = revWalk.parseCommit(srcObjectId);

        // get the parent of the commit to revert
        if (srcCommit.getParentCount() != 1) {
          throw new MultipleParentsNotAllowedException(
              JGitText.get().canOnlyRevertCommitsWithOneParent);
View Full Code Here

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

      }
    } finally {
      dc.unlock();
    }
    RevWalk rw = new RevWalk(repo);
    RevCommit commit = rw.parseCommit(repo.resolve(Constants.HEAD));
    rw.release();
    return commit;
  }

  /**
 
View Full Code Here

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

         // get the head commit
         Ref headRef = repo.getRef(Constants.HEAD);
         if (headRef == null)
            throw new NoHeadException(
                     JGitText.get().commitOnRepoWithoutHEADCurrentlyNotSupported);
         RevCommit headCommit = revWalk.parseCommit(headRef.getObjectId());

         newHead = headCommit;

         // get the commit to be cherry-picked
         // handle annotated tags
View Full Code Here

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

         // get the commit to be cherry-picked
         // handle annotated tags
         ObjectId srcObjectId = src.getPeeledObjectId();
         if (srcObjectId == null)
            srcObjectId = src.getObjectId();
         RevCommit srcCommit = revWalk.parseCommit(srcObjectId);

         // get the parent of the commit to cherry-pick
         if (srcCommit.getParentCount() == 0)
            throw new CantMergeCommitWithZeroParentsException("Commit with zero parents cannot be merged");
View Full Code Here

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

   {
      final RevWalk rw = new RevWalk(db);
      final RevCommit commit;
      try
      {
         commit = rw.parseCommit(branch.getObjectId());
      }
      finally
      {
         rw.release();
      }
View Full Code Here

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

          ObjectId commitId = odi.insert(commit);
          odi.flush();

          RevWalk revWalk = new RevWalk(repo);
          try {
            RevCommit revCommit = revWalk.parseCommit(commitId);
            RefUpdate ru = repo.updateRef(Constants.HEAD);
            ru.setNewObjectId(commitId);
            String prefix = amend ? "commit (amend): " : "commit: ";
            ru.setRefLogMessage(
                prefix + revCommit.getShortMessage(), false);
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.