Package org.eclipse.jgit.errors

Examples of org.eclipse.jgit.errors.MissingObjectException


  private long findDeltaBase(DfsReader ctx, ObjectId baseId)
      throws IOException, MissingObjectException {
    long ofs = idx(ctx).findOffset(baseId);
    if (ofs < 0)
      throw new MissingObjectException(baseId,
          JGitText.get().missingDeltaBase);
    return ofs;
  }
View Full Code Here


  private long findDeltaBase(ObjectId baseId) throws IOException,
      MissingObjectException {
    long ofs = idx().findOffset(baseId);
    if (ofs < 0)
      throw new MissingObjectException(baseId,
          JGitText.get().missingDeltaBase);
    return ofs;
  }
View Full Code Here

      throws MissingObjectException, IncorrectObjectTypeException,
      IOException {
    final ObjectLoader ldr = db.openObject(this, objectId);
    if (ldr == null) {
      if (typeHint == OBJ_ANY)
        throw new MissingObjectException(objectId.copy(), "unknown");
      throw new MissingObjectException(objectId.copy(), typeHint);
    }
    if (typeHint != OBJ_ANY && ldr.getType() != typeHint)
      throw new IncorrectObjectTypeException(objectId.copy(), typeHint);
    return ldr;
  }
View Full Code Here

      throws MissingObjectException, IncorrectObjectTypeException,
      IOException {
    long sz = db.getObjectSize(this, objectId);
    if (sz < 0) {
      if (typeHint == OBJ_ANY)
        throw new MissingObjectException(objectId.copy(), "unknown");
      throw new MissingObjectException(objectId.copy(), typeHint);
    }
    return sz;
  }
View Full Code Here

        case NEW:
          entry.newId = id;
          break;
        }
      } else if (ids.size() == 0)
        throw new MissingObjectException(id, Constants.OBJ_BLOB);
      else
        throw new AmbiguousObjectException(id, ids);
    }

    try {
View Full Code Here

            JGitText.get().downloadCancelledDuringIndexing);
    }

    for (final DeltaChain base : missing) {
      if (base.head != null)
        throw new MissingObjectException(base, "delta base");
    }

    onEndThinPack();
  }
View Full Code Here

    RevCommit c;
    while ((c = ow.next()) != null) {
      if (checkReferencedIsReachable //
          && !c.has(RevFlag.UNINTERESTING) //
          && !providedObjects.contains(c))
        throw new MissingObjectException(c, Constants.TYPE_COMMIT);
    }

    RevObject o;
    while ((o = ow.nextObject()) != null) {
      if (o.has(RevFlag.UNINTERESTING))
        continue;

      if (checkReferencedIsReachable) {
        if (providedObjects.contains(o))
          continue;
        else
          throw new MissingObjectException(o, o.getType());
      }

      if (o instanceof RevBlob && !db.hasObject(o))
        throw new MissingObjectException(o, Constants.TYPE_BLOB);
    }

    if (checkReferencedIsReachable) {
      for (ObjectId id : baseObjects) {
        o = ow.parseAny(id);
        if (!o.has(RevFlag.UNINTERESTING))
          throw new MissingObjectException(o, o.getType());
      }
    }
  }
View Full Code Here

    RevCommit c;
    while ((c = ow.next()) != null) {
      if (providedObjects != null //
          && !c.has(RevFlag.UNINTERESTING) //
          && !providedObjects.contains(c))
        throw new MissingObjectException(c, Constants.TYPE_COMMIT);
    }

    RevObject o;
    while ((o = ow.nextObject()) != null) {
      if (o.has(RevFlag.UNINTERESTING))
        continue;

      if (providedObjects != null) {
        if (providedObjects.contains(o))
          continue;
        else
          throw new MissingObjectException(o, o.getType());
      }

      if (o instanceof RevBlob && !db.hasObject(o))
        throw new MissingObjectException(o, Constants.TYPE_BLOB);
    }

    if (baseObjects != null) {
      for (ObjectId id : baseObjects) {
        o = ow.parseAny(id);
        if (!o.has(RevFlag.UNINTERESTING))
          throw new MissingObjectException(o, o.getType());
      }
    }
  }
View Full Code Here

  private long findDeltaBase(DfsReader ctx, ObjectId baseId)
      throws IOException, MissingObjectException {
    long ofs = idx(ctx).findOffset(baseId);
    if (ofs < 0)
      throw new MissingObjectException(baseId,
          JGitText.get().missingDeltaBase);
    return ofs;
  }
View Full Code Here

        return ldr;
      }
    }

    if (typeHint == OBJ_ANY)
      throw new MissingObjectException(objectId.copy(), "unknown");
    throw new MissingObjectException(objectId.copy(), typeHint);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.errors.MissingObjectException

Copyright © 2018 www.massapicom. 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.