Package org.eclipse.jgit.revwalk

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


    if (ref instanceof PeeledTag) {
      RevWalk rw = new RevWalk(repo);
      try {
        RevTag tag = rw.parseTag(ref.getObjectId());

        return !(rw.parseAny(tag.getObject()) instanceof RevCommit);
      } catch (IOException e) {
        Activator.logError(e.getMessage(), e);
      } finally {
        rw.dispose();
      }
View Full Code Here


    walk.setRetainBody(true);
    try {
      Map<String, Ref> tagRefs = getRefs(repo, Constants.R_TAGS);
      for (Ref tagRef : tagRefs.values()) {
        ObjectId objectId = tagRef.getLeaf().getObjectId();
        RevObject revObject = walk.parseAny(objectId);
        RevObject peeledObject = walk.peel(revObject);
        TagNode tagNode = createTagNode(parentNode, repo, tagRef,
            revObject, peeledObject);
        nodes.add(tagNode);
      }
View Full Code Here

        // a RevWalk allows to retrieve information from the repository
        RevWalk walk = new RevWalk(repository);

        // a simple tag that is not annotated
        Ref simpleTag = repository.getRef("initialtag");
        RevObject any = walk.parseAny(simpleTag.getObjectId());
        System.out.println("Commit: " + any);

        // an annotated tag
        Ref annotatedTag = repository.getRef("secondtag");
        any = walk.parseAny(annotatedTag.getObjectId());
View Full Code Here

        RevObject any = walk.parseAny(simpleTag.getObjectId());
        System.out.println("Commit: " + any);

        // an annotated tag
        Ref annotatedTag = repository.getRef("secondtag");
        any = walk.parseAny(annotatedTag.getObjectId());
        System.out.println("Tag: " + any);

        // finally try to print out the tag-content
        System.out.println("\nTag-Content: \n");
        ObjectLoader loader = repository.open(annotatedTag.getObjectId());
View Full Code Here

  private ObjectIdRef doPeel(final Ref leaf) throws MissingObjectException,
      IOException {
    RevWalk rw = new RevWalk(getRepository());
    try {
      RevObject obj = rw.parseAny(leaf.getObjectId());
      if (obj instanceof RevTag) {
        return new ObjectIdRef.PeeledTag(leaf.getStorage(), leaf
            .getName(), leaf.getObjectId(), rw.peel(obj).copy());
      } else {
        return new ObjectIdRef.PeeledNonTag(leaf.getStorage(), leaf
View Full Code Here

  private ObjectIdRef doPeel(final Ref leaf) throws MissingObjectException,
      IOException {
    RevWalk rw = new RevWalk(getRepository());
    try {
      RevObject obj = rw.parseAny(leaf.getObjectId());
      if (obj instanceof RevTag) {
        return new ObjectIdRef.PeeledTag(leaf.getStorage(), leaf
            .getName(), leaf.getObjectId(), rw.peel(obj).copy());
      } else {
        return new ObjectIdRef.PeeledNonTag(leaf.getStorage(), leaf
View Full Code Here

  private ObjectIdRef doPeel(final Ref leaf) throws MissingObjectException,
      IOException {
    RevWalk rw = new RevWalk(getRepository());
    try {
      RevObject obj = rw.parseAny(leaf.getObjectId());
      if (obj instanceof RevTag) {
        return new ObjectIdRef.PeeledTag(leaf.getStorage(), leaf
            .getName(), leaf.getObjectId(), rw.peel(obj).copy());
      } else {
        return new ObjectIdRef.PeeledNonTag(leaf.getStorage(), leaf
View Full Code Here

          if (peeledId == null)
            continue;

          objectId = ref.getObjectId();
          if (pw.willInclude(peeledId) && !pw.willInclude(objectId))
            pw.addObject(rw.parseAny(objectId));
        }
      }

      pw.writePack(pm, NullProgressMonitor.INSTANCE, packOut);
      statistics = pw.getStatistics();
View Full Code Here

          refLogMessage = "branch: Reset start-point to branch " //$NON-NLS-1$
              + startPointFullName; // TODO
        else
          refLogMessage = "branch: Created from branch " + baseBranch; //$NON-NLS-1$
      } else {
        startAt = revWalk.peel(revWalk.parseAny(startAt));
        if (exists)
          refLogMessage = "branch: Reset start-point to tag " //$NON-NLS-1$
              + startPointFullName;
        else
          refLogMessage = "branch: Created from tag " //$NON-NLS-1$
View Full Code Here

          if (peeledId == null)
            continue;

          objectId = ref.getObjectId();
          if (pw.willInclude(peeledId) && !pw.willInclude(objectId))
            pw.addObject(rw.parseAny(objectId));
        }
      }

      pw.writePack(pm, NullProgressMonitor.INSTANCE, packOut);
      statistics = pw.getStatistics();
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.