Examples of PackIndexWriter


Examples of org.eclipse.jgit.internal.storage.file.PackIndexWriter

  public void writeIndex(final OutputStream indexStream) throws IOException {
    if (isIndexDisabled())
      throw new IOException(JGitText.get().cachedPacksPreventsIndexCreation);

    long writeStart = System.currentTimeMillis();
    final PackIndexWriter iw = PackIndexWriter.createVersion(
        indexStream, getIndexVersion());
    iw.write(sortByName(), packcsum);
    stats.timeWriting += System.currentTimeMillis() - writeStart;
  }
View Full Code Here

Examples of org.eclipse.jgit.internal.storage.file.PackIndexWriter

    File packFile = new File(packDir, packName + ".pack");
    FileUtils.mkdir(packDir, true);
    OutputStream dst = new SafeBufferedOutputStream(new FileOutputStream(
        idxFile));
    try {
      PackIndexWriter writer = new PackIndexWriterV2(dst);
      writer.write(objects, new byte[OBJECT_ID_LENGTH]);
    } finally {
      dst.close();
    }
    new FileOutputStream(packFile).close();
View Full Code Here

Examples of org.eclipse.jgit.internal.storage.file.PackIndexWriter

  public void writeIndex(final OutputStream indexStream) throws IOException {
    if (isIndexDisabled())
      throw new IOException(JGitText.get().cachedPacksPreventsIndexCreation);

    long writeStart = System.currentTimeMillis();
    final PackIndexWriter iw = PackIndexWriter.createVersion(
        indexStream, getIndexVersion());
    iw.write(sortByName(), packcsum);
    stats.timeWriting += System.currentTimeMillis() - writeStart;
  }
View Full Code Here

Examples of org.eclipse.jgit.storage.file.PackIndexWriter

    if (!cachedPacks.isEmpty())
      throw new IOException(JGitText.get().cachedPacksPreventsIndexCreation);

    long writeStart = System.currentTimeMillis();
    final List<ObjectToPack> list = sortByName();
    final PackIndexWriter iw;
    int indexVersion = config.getIndexVersion();
    if (indexVersion <= 0)
      iw = PackIndexWriter.createOldestPossible(indexStream, list);
    else
      iw = PackIndexWriter.createVersion(indexStream, indexVersion);
    iw.write(list, packcsum);
    stats.timeWriting += System.currentTimeMillis() - writeStart;
  }
View Full Code Here

Examples of org.eclipse.jgit.storage.file.PackIndexWriter

  public void writeIndex(final OutputStream indexStream) throws IOException {
    if (!cachedPacks.isEmpty())
      throw new IOException(JGitText.get().cachedPacksPreventsIndexCreation);

    final List<ObjectToPack> list = sortByName();
    final PackIndexWriter iw;
    int indexVersion = config.getIndexVersion();
    if (indexVersion <= 0)
      iw = PackIndexWriter.createOldestPossible(indexStream, list);
    else
      iw = PackIndexWriter.createVersion(indexStream, indexVersion);
    iw.write(list, packcsum);
  }
View Full Code Here

Examples of org.eclipse.jgit.storage.file.PackIndexWriter

  public void writeIndex(final OutputStream indexStream) throws IOException {
    if (!cachedPacks.isEmpty())
      throw new IOException(JGitText.get().cachedPacksPreventsIndexCreation);

    final List<ObjectToPack> list = sortByName();
    final PackIndexWriter iw;
    int indexVersion = config.getIndexVersion();
    if (indexVersion <= 0)
      iw = PackIndexWriter.createOldestPossible(indexStream, list);
    else
      iw = PackIndexWriter.createVersion(indexStream, indexVersion);
    iw.write(list, packcsum);
  }
View Full Code Here

Examples of org.eclipse.jgit.storage.file.PackIndexWriter

   * @throws IOException
   *             the index data could not be written to the supplied stream.
   */
  public void writeIndex(final OutputStream indexStream) throws IOException {
    final List<ObjectToPack> list = sortByName();
    final PackIndexWriter iw;
    int indexVersion = config.getIndexVersion();
    if (indexVersion <= 0)
      iw = PackIndexWriter.createOldestPossible(indexStream, list);
    else
      iw = PackIndexWriter.createVersion(indexStream, indexVersion);
    iw.write(list, packcsum);
  }
View Full Code Here

Examples of org.eclipse.jgit.storage.file.PackIndexWriter

    if (entryCount < entries.length)
      list = list.subList(0, entryCount);

    final FileOutputStream os = new FileOutputStream(dstIdx);
    try {
      final PackIndexWriter iw;
      if (outputVersion <= 0)
        iw = PackIndexWriter.createOldestPossible(os, list);
      else
        iw = PackIndexWriter.createVersion(os, outputVersion);
      iw.write(list, packcsum);
      os.getChannel().force(true);
    } finally {
      os.close();
    }
  }
View Full Code Here

Examples of org.eclipse.jgit.storage.file.PackIndexWriter

    if (!cachedPacks.isEmpty())
      throw new IOException(JGitText.get().cachedPacksPreventsIndexCreation);

    long writeStart = System.currentTimeMillis();
    final List<ObjectToPack> list = sortByName();
    final PackIndexWriter iw;
    int indexVersion = config.getIndexVersion();
    if (indexVersion <= 0)
      iw = PackIndexWriter.createOldestPossible(indexStream, list);
    else
      iw = PackIndexWriter.createVersion(indexStream, indexVersion);
    iw.write(list, packcsum);
    stats.timeWriting += System.currentTimeMillis() - writeStart;
  }
View Full Code Here

Examples of org.eclipse.jgit.storage.file.PackIndexWriter

    if (!cachedPacks.isEmpty())
      throw new IOException(JGitText.get().cachedPacksPreventsIndexCreation);

    long writeStart = System.currentTimeMillis();
    final List<ObjectToPack> list = sortByName();
    final PackIndexWriter iw;
    int indexVersion = config.getIndexVersion();
    if (indexVersion <= 0)
      iw = PackIndexWriter.createOldestPossible(indexStream, list);
    else
      iw = PackIndexWriter.createVersion(indexStream, indexVersion);
    iw.write(list, packcsum);
    stats.timeWriting += System.currentTimeMillis() - writeStart;
  }
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.