Package org.eclipse.jgit.errors

Examples of org.eclipse.jgit.errors.MissingObjectException


            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

    for (;;) {
      final RevObject o = nextObject();
      if (o == null)
        break;
      if (o instanceof RevBlob && !reader.has(o))
        throw new MissingObjectException(o, OBJ_BLOB);
    }
  }
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

  @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

        return ldr;
      }
    }

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

        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) {
        cancelReadAhead();
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

      throws IOException, MissingObjectException {
    DfsPackFile[] packList = db.getPacks();
    if (packList.length == 0) {
      Iterator<ObjectToPack> itr = objects.iterator();
      if (itr.hasNext())
        throw new MissingObjectException(itr.next(), "unknown");
      return;
    }

    int objectCount = 0;
    int updated = 0;
    int posted = 0;
    List<DfsObjectRepresentation> all = new BlockList<DfsObjectRepresentation>();
    for (ObjectToPack otp : objects) {
      boolean found = false;
      for (int packIndex = 0; packIndex < packList.length; packIndex++) {
        DfsPackFile pack = packList[packIndex];
        long p = pack.findOffset(this, otp);
        if (0 < p) {
          DfsObjectRepresentation r = new DfsObjectRepresentation(otp);
          r.pack = pack;
          r.packIndex = packIndex;
          r.offset = p;
          all.add(r);
          found = true;
        }
      }
      if (!found)
        throw new MissingObjectException(otp, otp.getType());
      if ((++updated & 1) == 1) {
        monitor.update(1); // Update by 50%, the other 50% is below.
        posted++;
      }
      objectCount++;
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.