Package org.eclipse.jgit.errors

Examples of org.eclipse.jgit.errors.MissingObjectException


        return cur.id;
      }

      public ObjectLoader open() throws IOException {
        if (cur.pack == null)
          throw new MissingObjectException(cur.id, "unknown");
        return cur.pack.load(DfsReader.this, cur.offset);
      }

      public boolean cancel(boolean mayInterruptIfRunning) {
        return true;
View Full Code Here


      public boolean next() throws MissingObjectException, IOException {
        if (idItr.hasNext()) {
          cur = idItr.next();
          if (cur.pack == null)
            throw new MissingObjectException(cur.id, "unknown");
          sz = cur.pack.getObjectSize(DfsReader.this, cur.offset);
          return true;
        } else if (findAllError != null) {
          throw findAllError;
        } else {
View Full Code Here

        return sz;
      }
    }

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

  @Override
  public long findCRC32(AnyObjectId objId) throws MissingObjectException {
    final int levelOne = objId.getFirstByte();
    final int levelTwo = binarySearchLevelTwo(objId, levelOne);
    if (levelTwo == -1)
      throw new MissingObjectException(objId.copy(), "unknown");
    return NB.decodeUInt32(crc32[levelOne], levelTwo << 2);
  }
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

  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

            JGitText.get().downloadCancelledDuringIndexing);
    }

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

    onEndThinPack();
  }
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

      if (reader.has(obj, Constants.OBJ_BLOB))
        obj.add(COMPLETE);
      else
        throw new TransportException(MessageFormat.format(JGitText
            .get().cannotReadBlob, obj.name()),
            new MissingObjectException(obj, Constants.TYPE_BLOB));
    } catch (IOException error) {
      throw new TransportException(MessageFormat.format(
          JGitText.get().cannotReadBlob, obj.name()), error);
    }
  }
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.