Examples of PackMismatchException


Examples of org.eclipse.jgit.errors.PackMismatchException

        final PackIndex idx = PackIndex.open(idxFile);

        if (packChecksum == null)
          packChecksum = idx.packChecksum;
        else if (!Arrays.equals(packChecksum, idx.packChecksum))
          throw new PackMismatchException(JGitText.get().packChecksumMismatch);

        loadedIdx = idx;
      } catch (IOException e) {
        invalid = true;
        throw e;
View Full Code Here

Examples of org.eclipse.jgit.errors.PackMismatchException

    final long packCnt = NB.decodeUInt32(buf, 8);
    if (vers != 2 && vers != 3)
      throw new IOException(MessageFormat.format(JGitText.get().unsupportedPackVersion, vers));

    if (packCnt != idx.getObjectCount())
      throw new PackMismatchException(MessageFormat.format(
          JGitText.get().packObjectCountMismatch, packCnt, idx.getObjectCount(), getPackFile()));

    fd.seek(length - 20);
    fd.readFully(buf, 0, 20);
    if (!Arrays.equals(buf, packChecksum))
      throw new PackMismatchException(MessageFormat.format(
          JGitText.get().packObjectCountMismatch
          , ObjectId.fromRaw(buf).name()
          , ObjectId.fromRaw(idx.packChecksum).name()
          , getPackFile()));
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.PackMismatchException

        final PackIndex idx = PackIndex.open(idxFile);

        if (packChecksum == null)
          packChecksum = idx.packChecksum;
        else if (!Arrays.equals(packChecksum, idx.packChecksum))
          throw new PackMismatchException(JGitText.get().packChecksumMismatch);

        loadedIdx = idx;
      } catch (IOException e) {
        invalid = true;
        throw e;
View Full Code Here

Examples of org.eclipse.jgit.errors.PackMismatchException

    final long packCnt = NB.decodeUInt32(buf, 8);
    if (vers != 2 && vers != 3)
      throw new IOException(MessageFormat.format(JGitText.get().unsupportedPackVersion, vers));

    if (packCnt != idx.getObjectCount())
      throw new PackMismatchException(MessageFormat.format(
          JGitText.get().packObjectCountMismatch, packCnt, idx.getObjectCount(), getPackFile()));

    fd.seek(length - 20);
    fd.readFully(buf, 0, 20);
    if (!Arrays.equals(buf, packChecksum))
      throw new PackMismatchException(MessageFormat.format(
          JGitText.get().packObjectCountMismatch
          , ObjectId.fromRaw(buf).name()
          , ObjectId.fromRaw(idx.packChecksum).name()
          , getPackFile()));
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.PackMismatchException

        final PackIndex idx = PackIndex.open(extFile(INDEX));

        if (packChecksum == null)
          packChecksum = idx.packChecksum;
        else if (!Arrays.equals(packChecksum, idx.packChecksum))
          throw new PackMismatchException(JGitText.get().packChecksumMismatch);

        loadedIdx = idx;
      } catch (IOException e) {
        invalid = true;
        throw e;
View Full Code Here

Examples of org.eclipse.jgit.errors.PackMismatchException

    if (vers != 2 && vers != 3)
      throw new IOException(MessageFormat.format(
          JGitText.get().unsupportedPackVersion, Long.valueOf(vers)));

    if (packCnt != idx.getObjectCount())
      throw new PackMismatchException(MessageFormat.format(
          JGitText.get().packObjectCountMismatch,
          Long.valueOf(packCnt), Long.valueOf(idx.getObjectCount()),
          getPackFile()));

    fd.seek(length - 20);
    fd.readFully(buf, 0, 20);
    if (!Arrays.equals(buf, packChecksum))
      throw new PackMismatchException(MessageFormat.format(
          JGitText.get().packObjectCountMismatch
          , ObjectId.fromRaw(buf).name()
          , ObjectId.fromRaw(idx.packChecksum).name()
          , getPackFile()));
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.PackMismatchException

        final PackIndex idx = PackIndex.open(idxFile);

        if (packChecksum == null)
          packChecksum = idx.packChecksum;
        else if (!Arrays.equals(packChecksum, idx.packChecksum))
          throw new PackMismatchException(JGitText.get().packChecksumMismatch);

        loadedIdx = idx;
      } catch (IOException e) {
        invalid = true;
        throw e;
View Full Code Here

Examples of org.eclipse.jgit.errors.PackMismatchException

    final long packCnt = NB.decodeUInt32(buf, 8);
    if (vers != 2 && vers != 3)
      throw new IOException(MessageFormat.format(JGitText.get().unsupportedPackVersion, vers));

    if (packCnt != idx.getObjectCount())
      throw new PackMismatchException(MessageFormat.format(
          JGitText.get().packObjectCountMismatch, packCnt, idx.getObjectCount(), getPackFile()));

    fd.seek(length - 20);
    fd.read(buf, 0, 20);
    if (!Arrays.equals(buf, packChecksum))
      throw new PackMismatchException(MessageFormat.format(
          JGitText.get().packObjectCountMismatch
          , ObjectId.fromRaw(buf).name()
          , ObjectId.fromRaw(idx.packChecksum).name()
          , getPackFile()));
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.PackMismatchException

        final PackIndex idx = PackIndex.open(idxFile);

        if (packChecksum == null)
          packChecksum = idx.packChecksum;
        else if (!Arrays.equals(packChecksum, idx.packChecksum))
          throw new PackMismatchException(JGitText.get().packChecksumMismatch);

        loadedIdx = idx;
      } catch (IOException e) {
        invalid = true;
        throw e;
View Full Code Here

Examples of org.eclipse.jgit.errors.PackMismatchException

    if (vers != 2 && vers != 3)
      throw new IOException(MessageFormat.format(
          JGitText.get().unsupportedPackVersion, Long.valueOf(vers)));

    if (packCnt != idx.getObjectCount())
      throw new PackMismatchException(MessageFormat.format(
          JGitText.get().packObjectCountMismatch,
          Long.valueOf(packCnt), Long.valueOf(idx.getObjectCount()),
          getPackFile()));

    fd.seek(length - 20);
    fd.readFully(buf, 0, 20);
    if (!Arrays.equals(buf, packChecksum))
      throw new PackMismatchException(MessageFormat.format(
          JGitText.get().packObjectCountMismatch
          , ObjectId.fromRaw(buf).name()
          , ObjectId.fromRaw(idx.packChecksum).name()
          , getPackFile()));
  }
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.