Package org.eclipse.jgit.revwalk

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


            }
           
            walk = new RevWalk(git.getRepository());
            walk.setRetainBody(true);

            return walk.parseCommit(commit);
        }
        catch (IOException e)
        {
            throw new JGitFlowIOException(e);
        }
View Full Code Here


        {
            ObjectId branch = git.getRepository().resolve(branchName);
            walk = new RevWalk(git.getRepository());
            walk.setRetainBody(true);

            return walk.parseCommit(branch);
        }
        catch (IOException e)
        {
            throw new JGitFlowIOException(e);
        }
View Full Code Here

            checkNotNull(remote);
            checkNotNull(local);

            ObjectId remoteId = git.getRepository().resolve(remote.getObjectId().getName());
            RevCommit remoteCommit = walk.parseCommit(remoteId);
            RevCommit localCommit = walk.parseCommit(local.getObjectId());

            if (!localCommit.equals(remoteCommit))
            {
                reporter.debugText(getName(),localCommit.getName() + " !equals " + remoteCommit.getName());
View Full Code Here

            checkNotNull(remote);
            checkNotNull(local);

            ObjectId remoteId = git.getRepository().resolve(remote.getObjectId().getName());
            RevCommit remoteCommit = walk.parseCommit(remoteId);
            RevCommit localCommit = walk.parseCommit(local.getObjectId());

            if (!localCommit.equals(remoteCommit))
            {
                reporter.debugText(getName(),localCommit.getName() + " !equals " + remoteCommit.getName());
                behind = true;
View Full Code Here

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

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

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

  /**
 
View Full Code Here

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

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

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

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.