Package org.eclipse.jgit.revwalk

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


        ObjectId.fromString("5b6e7c66c276e7610d4a73c70ec1a1f7c1003259"),
        ObjectId.fromString("6ff87c4664981e4397625791c8ea3bbb5f2279a3") };
    final RevWalk parser = new RevWalk(db);
    final RevObject forcedOrderRevs[] = new RevObject[forcedOrder.length];
    for (int i = 0; i < forcedOrder.length; i++)
      forcedOrderRevs[i] = parser.parseAny(forcedOrder[i]);

    createVerifyOpenPack(Arrays.asList(forcedOrderRevs));

    assertEquals(forcedOrder.length, writer.getObjectCount());
    verifyObjectsOrder(forcedOrder);
View Full Code Here


        ObjectId id = rewrites.get(origId);
        if (id == null)
          id = origId;
        try {
          rw.parseAny(id);
        } catch (MissingObjectException mue) {
          if (!Constants.TYPE_COMMIT.equals(type)) {
            errw.println(MessageFormat.format(CLIText.get().skippingObject, type, name));
            continue;
          }
View Full Code Here

  private RevCommit parseCommit() {
    if (this.commit == null) {
      RevWalk rw = new RevWalk(db);
      RevObject any;
      try {
        any = rw.parseAny(this.ref.getObjectId());
        if (any instanceof RevTag) {
          this.tag = (RevTag) any;
          this.commit = (RevCommit) rw.peel(any);
        } else if (any instanceof RevCommit) {
          this.commit = (RevCommit) any;
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

        ObjectId.fromString("5b6e7c66c276e7610d4a73c70ec1a1f7c1003259"),
        ObjectId.fromString("6ff87c4664981e4397625791c8ea3bbb5f2279a3") };
    final RevWalk parser = new RevWalk(db);
    final RevObject forcedOrderRevs[] = new RevObject[forcedOrder.length];
    for (int i = 0; i < forcedOrder.length; i++)
      forcedOrderRevs[i] = parser.parseAny(forcedOrder[i]);

    createVerifyOpenPack(Arrays.asList(forcedOrderRevs).iterator());

    assertEquals(forcedOrder.length, writer.getObjectsNumber());
    verifyObjectsOrder(forcedOrder);
View Full Code Here

        ObjectId id = rewrites.get(origId);
        if (id == null)
          id = origId;
        try {
          rw.parseAny(id);
        } catch (MissingObjectException mue) {
          if (!Constants.TYPE_COMMIT.equals(type)) {
            System.err.println(MessageFormat.format(CLIText.get().skippingObject, type, name));
            continue;
          }
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

        CLIText.get().warningNoCommitGivenOnCommandLine, Constants.HEAD));
      commitId = db.resolve(Constants.HEAD);
    }

    final RevWalk rw = new RevWalk(db);
    final RevObject start = rw.parseAny(commitId);
    if (version == null && start instanceof RevTag)
      version = ((RevTag) start).getTagName();
    else if (version == null)
      throw die(MessageFormat.format(CLIText.get().notATagVersionIsRequired, start.name()));
View Full Code Here

          refLogMessage = "branch: Reset start-point to branch "
              + startPointFullName; // TODO
        else
          refLogMessage = "branch: Created from branch " + baseBranch;
      } else {
        startAt = revWalk.peel(revWalk.parseAny(startAt));
        if (exists)
          refLogMessage = "branch: Reset start-point to tag "
              + startPointFullName;
        else
          refLogMessage = "branch: Created from tag "
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.