Examples of parseCommit()


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

            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))
            {
                behind = true;
View Full Code Here

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

            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))
            {
                behind = true;
                walk.setRevFilter(RevFilter.MERGE_BASE);
View Full Code Here

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

  private RevCommit parse(final Repository git, PatchSet ps)
      throws MissingObjectException, IncorrectObjectTypeException, IOException {
    RevWalk rw = new RevWalk(git);
    try {
      return rw.parseCommit(ObjectId.fromString(ps.getRevision().get()));
    } finally {
      rw.release();
    }
  }
View Full Code Here

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

          if (rw == null) {
            rw = new RevWalk(m.db);
            rw.setRetainBody(false);
          }

          RevCommit savedCommit = rw.parseCommit(savedObjectId);
          RevCommit currentCommit = rw.parseCommit(currentRef.getObjectId());
          if (rw.isMergedInto(savedCommit, currentCommit)) {
            // Fast-forward. Safely update the reference in-place.
            savedRef.compareAndSet(savedObjectId, currentRef.getObjectId());
            m.mask.set(savedRef.flag);
View Full Code Here

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

            rw = new RevWalk(m.db);
            rw.setRetainBody(false);
          }

          RevCommit savedCommit = rw.parseCommit(savedObjectId);
          RevCommit currentCommit = rw.parseCommit(currentRef.getObjectId());
          if (rw.isMergedInto(savedCommit, currentCommit)) {
            // Fast-forward. Safely update the reference in-place.
            savedRef.compareAndSet(savedObjectId, currentRef.getObjectId());
            m.mask.set(savedRef.flag);
            continue;
View Full Code Here

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

    this.entry = patchList.get(fileName);

    final ObjectReader reader = repo.newObjectReader();
    try {
      final RevWalk rw = new RevWalk(reader);
      final RevCommit bCommit = rw.parseCommit(patchList.getNewId());

      if (Patch.COMMIT_MSG.equals(fileName)) {
        if (patchList.isAgainstParent()) {
          a = Text.EMPTY;
        } else {
View Full Code Here

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

      try {
        NoteMap baseNoteMap = null;
        RevCommit baseCommit = null;
        final Ref notesBranch = repo.getRef(REF_REJECT_COMMITS);
        if (notesBranch != null) {
          baseCommit = revWalk.parseCommit(notesBranch.getObjectId());
          baseNoteMap = NoteMap.read(revWalk.getObjectReader(), baseCommit);
        }

        final NoteMap ourNoteMap;
        if (baseCommit != null) {
View Full Code Here

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

          ourNoteMap = NoteMap.newEmptyMap();
        }

        for (final ObjectId commitToBan : commitsToBan) {
          try {
            revWalk.parseCommit(commitToBan);
          } catch (MissingObjectException e) {
            // ignore exception, also not existing commits can be banned
          } catch (IncorrectObjectTypeException e) {
            result.notACommit(commitToBan, e.getMessage());
            continue;
View Full Code Here

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

        ru.setExpectedOldObjectId(ObjectId.zeroId());
        ru.setNewObjectId(src);
        RefUpdate.Result result = ru.update();
        switch (result) {
          case NEW:
            revision = rw.parseCommit(ru.getNewObjectId());
            update.replicate(ru.getName());
            return revision;
          default:
            throw new IOException("Cannot update " + ru.getName() + " in "
                + db.getDirectory() + ": " + ru.getResult());
View Full Code Here

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

        inserter.flush();

        switch (ru.update(rw)) {
          case NEW:
          case FAST_FORWARD:
            revision = rw.parseCommit(ru.getNewObjectId());
            update.replicate(ru.getName());
            return revision;

          default:
            throw new IOException("Cannot update " + ru.getName() + " in "
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.