Examples of ObjectLoader


Examples of org.eclipse.jgit.lib.ObjectLoader

      else
        throw new AmbiguousObjectException(id, ids);
    }

    try {
      ObjectLoader ldr = source.open(side, entry);
      return ldr.getBytes(binaryFileThreshold);

    } catch (LargeObjectException.ExceedsLimit overLimit) {
      return BINARY;

    } catch (LargeObjectException.ExceedsByteArrayLimit overLimit) {
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectLoader

        continue;

      if (needBaseObjectIds)
        baseObjectIds.add(baseId);

      final ObjectLoader ldr;
      try {
        ldr = readCurs.open(baseId);
      } catch (MissingObjectException notFound) {
        missing.add(baseId);
        continue;
      }

      final DeltaVisit visit = new DeltaVisit();
      visit.data = ldr.getCachedBytes(Integer.MAX_VALUE);
      visit.id = baseId;
      final int typeCode = ldr.getType();
      final PackedObjectInfo oe = newInfo(baseId, null, null);

      if (onAppendBase(typeCode, visit.data, oe))
        entries[entryCount++] = oe;
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectLoader

      }
    }

    if (isCheckObjectCollisions()) {
      try {
        final ObjectLoader ldr = readCurs.open(id, type);
        final byte[] existingData = ldr.getCachedBytes(data.length);
        if (!Arrays.equals(data, existingData)) {
          throw new IOException(MessageFormat.format(
              JGitText.get().collisionOn, id.name()));
        }
      } catch (MissingObjectException notLocal) {
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectLoader

   * @throws IOException
   *             the repository cannot be read.
   */
  public BlameGenerator push(String description, AnyObjectId id)
      throws IOException {
    ObjectLoader ldr = reader.open(id);
    if (ldr.getType() == OBJ_BLOB) {
      if (description == null)
        description = JGitText.get().blameNotCommittedYet;
      BlobCandidate c = new BlobCandidate(description, resultPath);
      c.sourceBlob = id.toObjectId();
      c.sourceText = new RawText(ldr.getCachedBytes(Integer.MAX_VALUE));
      c.regionList = new Region(0, 0, c.sourceText.size());
      remaining = c.sourceText.size();
      push(c);
      return this;
    }
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectLoader

    r.renameScore = renameScore;
    return r;
  }

  void loadText(ObjectReader reader) throws IOException {
    ObjectLoader ldr = reader.open(sourceBlob, Constants.OBJ_BLOB);
    sourceText = new RawText(ldr.getCachedBytes(Integer.MAX_VALUE));
  }
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectLoader

  }

  ObjectLoader openObject1(final WindowCursor curs,
      final AnyObjectId objectId) throws IOException {
    if (unpackedObjectCache.isUnpacked(objectId)) {
      ObjectLoader ldr = openObject2(curs, objectId.name(), objectId);
      if (ldr != null)
        return ldr;
      else
        unpackedObjectCache.remove(objectId);
    }

    PackList pList = packList.get();
    SEARCH: for (;;) {
      for (final PackFile p : pList.packs) {
        try {
          final ObjectLoader ldr = p.get(curs, objectId);
          if (ldr != null)
            return ldr;
        } catch (PackMismatchException e) {
          // Pack was modified; refresh the entire pack list.
          //
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectLoader

   *         object, or null if the object does not exist.
   * @throws IOException
   */
  ObjectLoader openObject(final WindowCursor curs, final AnyObjectId objectId)
      throws IOException {
    ObjectLoader ldr;

    ldr = openObjectImpl1(curs, objectId);
    if (ldr != null)
      return ldr;

View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectLoader

    return null;
  }

  final ObjectLoader openObjectImpl1(final WindowCursor curs,
      final AnyObjectId objectId) throws IOException {
    ObjectLoader ldr;

    ldr = openObject1(curs, objectId);
    if (ldr != null)
      return ldr;
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectLoader

  }

  final ObjectLoader openObjectImpl2(final WindowCursor curs,
      final String objectName, final AnyObjectId objectId)
      throws IOException {
    ObjectLoader ldr;

    ldr = openObject2(curs, objectName, objectId);
    if (ldr != null)
      return ldr;
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectLoader

    }

    @Override
    public ObjectLoader open(String path, ObjectId id) throws IOException {
      seek(path);
      return new ObjectLoader() {
        @Override
        public long getSize() {
          return ptr.getEntryLength();
        }
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.