Examples of parseCommit()


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()

    NoteMap map = NoteMap.newEmptyMap();
    try {
      Ref ref = repo.getRef(notesRef);
      // if we have a notes ref, use it
      if (ref != null) {
        RevCommit notesCommit = walk.parseCommit(ref.getObjectId());
        map = NoteMap.read(walk.getObjectReader(), notesCommit);
      }

      Iterator<Note> i = map.iterator();
      while (i.hasNext())
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()

         // 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 CantMergeCommitException("Commit with zero parents cannot be merged");
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);
            if (reflogComment != null) {
              ru.setRefLogMessage(reflogComment, false);
            } else {
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()

            if (null != masterBranch)
            {
                try
                {
                    masterCommit = walk.parseCommit(masterBranch);
                }
                catch (MissingObjectException e)
                {
                    //ignore
                }
View Full Code Here

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

        {
            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
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.