Examples of AnyObjectId


Examples of org.eclipse.jgit.lib.AnyObjectId

  private void getRevCommits(Collection<RevCommit> commits) {
    final RevWalk revWalk = new RevWalk(repo);
    try {
      revWalk.sort(RevSort.COMMIT_TIME_DESC, true);
      revWalk.sort(RevSort.BOUNDARY, true);
      AnyObjectId headId = repo.resolve(Constants.HEAD);
      if (headId != null)
        revWalk.markStart(revWalk.parseCommit(headId));
      // do the walk to get the commits
      long count = 0;
      RevCommit commit;
View Full Code Here

Examples of org.eclipse.jgit.lib.AnyObjectId

    if (walk == null)
      return NO_REVISIONS;

    final RevCommit root;
    try {
      final AnyObjectId headId = db.resolve(Constants.HEAD);
      if (headId == null) {
        Activator.logError(NLS.bind(
            CoreText.GitFileHistory_noHeadRevisionAvailable,
            resource.getProject().getName()), null);
        return NO_REVISIONS;
View Full Code Here

Examples of org.eclipse.jgit.lib.AnyObjectId

      if (branch == null)
        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;
View Full Code Here

Examples of org.eclipse.jgit.lib.AnyObjectId

        bitmapPreparer.doCommitSelection(numCommits);

    beginPhase(PackingPhase.BUILDING_BITMAPS, pm, selectedCommits.size());

    PackWriterBitmapWalker walker = bitmapPreparer.newBitmapWalker();
    AnyObjectId last = null;
    for (PackWriterBitmapPreparer.BitmapCommit cmit : selectedCommits) {
      if (cmit.isReuseWalker())
        walker.reset();
      else
        walker = bitmapPreparer.newBitmapWalker();

      BitmapBuilder bitmap = walker.findObjects(
          Collections.singleton(cmit), null);

      if (last != null && cmit.isReuseWalker() && !bitmap.contains(last))
        throw new IllegalStateException(MessageFormat.format(
            JGitText.get().bitmapMissingObject, cmit.name(),
            last.name()));
      last = cmit;
      writeBitmaps.addBitmap(cmit, bitmap.build(), cmit.getFlags());

      pm.update(1);
    }
View Full Code Here

Examples of org.eclipse.jgit.lib.AnyObjectId

          JGitText.get().pullTaskName));

    // we check the updates to see which of the updated branches
    // corresponds
    // to the remote branch name
    AnyObjectId commitToMerge;
    if (isRemote) {
      Ref r = null;
      if (fetchRes != null) {
        r = fetchRes.getAdvertisedRef(remoteBranchName);
        if (r == null)
View Full Code Here

Examples of org.eclipse.jgit.lib.AnyObjectId

      if (branch == null)
        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;
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.