Package org.eclipse.jgit.revwalk

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


    try {
      Map<String, Ref> map = repository.getRefDatabase().getRefs(refs);
      RevWalk rw = new RevWalk(repository);
      for (Entry<String, Ref> entry : map.entrySet()) {
        Ref ref = entry.getValue();
        RevObject object = rw.parseAny(ref.getObjectId());
        String name = entry.getKey();
        if (fullName && !StringUtils.isEmpty(refs)) {
          name = refs + name;
        }
        list.add(new RefModel(name, ref, object));
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

    try {
      Map<String, Ref> map = repository.getRefDatabase().getRefs(refs);
      RevWalk rw = new RevWalk(repository);
      for (Entry<String, Ref> entry : map.entrySet()) {
        Ref ref = entry.getValue();
        RevObject object = rw.parseAny(ref.getObjectId());
        String name = entry.getKey();
        if (fullName && !StringUtils.isEmpty(refs)) {
          name = refs + name;
        }
        list.add(new RefModel(name, ref, object));
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);
View Full Code Here

  private Ref doPeel(final Ref leaf) throws MissingObjectException,
      IOException {
    RevWalk rw = new RevWalk(repository);
    try {
      RevObject obj = rw.parseAny(leaf.getObjectId());
      if (obj instanceof RevTag) {
        return new ObjectIdRef.PeeledTag(
            leaf.getStorage(),
            leaf.getName(),
            leaf.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

      else
        objectId = db.resolve(objectName);

      RevWalk rw = new RevWalk(db);
      try {
        RevObject obj = rw.parseAny(objectId);
        while (obj instanceof RevTag) {
          show((RevTag) obj);
          obj = ((RevTag) obj).getObject();
          rw.parseBody(obj);
        }
View Full Code Here

      TagCommand command = git.tag().setForceUpdate(force)
          .setMessage(message).setName(tagName);

      if (object != null) {
        RevWalk walk = new RevWalk(db);
        command.setObjectId(walk.parseAny(object));
      }
      try {
        command.call();
      } catch (RefAlreadyExistsException e) {
        throw die(MessageFormat.format(CLIText.get().tagAlreadyExists,
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

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.