Examples of preparePack()


Examples of org.eclipse.jgit.internal.storage.pack.PackWriter.preparePack()

      packWriter.setDeltaBaseAsOffset(true);
      packWriter.setThin(exc.size() > 0);
      packWriter.setReuseValidatingObjects(false);
      if (exc.size() == 0)
        packWriter.setTagTargets(tagTargets);
      packWriter.preparePack(monitor, inc, exc);

      final Writer w = new OutputStreamWriter(os, Constants.CHARSET);
      w.write(TransportBundle.V2_BUNDLE_SIGNATURE);
      w.write('\n');
View Full Code Here

Examples of org.eclipse.jgit.internal.storage.pack.PackWriter.preparePack()

      return;

    PackWriter pw = newPackWriter();
    try {
      pw.setTagTargets(tagTargets);
      pw.preparePack(pm, allHeads, Collections.<ObjectId> emptySet());
      if (0 < pw.getObjectCount())
        writePack(GC, pw, pm);
    } finally {
      pw.release();
    }
View Full Code Here

Examples of org.eclipse.jgit.internal.storage.pack.PackWriter.preparePack()

    PackWriter pw = newPackWriter();
    try {
      for (PackWriter.ObjectIdSet packedObjs : newPackObj)
        pw.excludeObjects(packedObjs);
      pw.preparePack(pm, nonHeads, allHeads);
      if (0 < pw.getObjectCount())
        writePack(GC, pw, pm);
    } finally {
      pw.release();
    }
View Full Code Here

Examples of org.eclipse.jgit.internal.storage.pack.PackWriter.preparePack()

      if (depth > 0)
        pw.setShallowPack(depth, unshallowCommits);

      RevWalk rw = walk;
      if (wantAll.isEmpty()) {
        pw.preparePack(pm, wantIds, commonBase);
      } else {
        walk.reset();

        ObjectWalk ow = walk.toObjectWalkWithSameObjects();
        pw.preparePack(pm, ow, wantAll, commonBase);
View Full Code Here

Examples of org.eclipse.jgit.internal.storage.pack.PackWriter.preparePack()

        pw.preparePack(pm, wantIds, commonBase);
      } else {
        walk.reset();

        ObjectWalk ow = walk.toObjectWalkWithSameObjects();
        pw.preparePack(pm, ow, wantAll, commonBase);
        rw = ow;
      }

      if (options.contains(OPTION_INCLUDE_TAG) && refs != null) {
        for (Ref ref : refs.values()) {
View Full Code Here

Examples of org.eclipse.jgit.internal.storage.pack.PackWriter.preparePack()

      if (tagTargets != null)
        pw.setTagTargets(tagTargets);
      if (excludeObjects != null)
        for (ObjectIdSet idx : excludeObjects)
          pw.excludeObjects(idx);
      pw.preparePack(pm, want, have);
      if (pw.getObjectCount() == 0)
        return null;

      // create temporary files
      String id = pw.computeName().getName();
View Full Code Here

Examples of org.eclipse.jgit.internal.storage.pack.PackWriter.preparePack()

      writer.setUseCachedPacks(true);
      writer.setUseBitmaps(true);
      writer.setThin(thinPack);
      writer.setReuseValidatingObjects(false);
      writer.setDeltaBaseAsOffset(capableOfsDelta);
      writer.preparePack(monitor, newObjects, remoteObjects);
      writer.writePack(monitor, monitor, out);
    } finally {
      writer.release();
    }
    packTransferTime = writer.getStatistics().getTimeWriting();
View Full Code Here

Examples of org.eclipse.jgit.internal.storage.pack.PackWriter.preparePack()

      for (final Ref r : getRefs()) {
        have.add(r.getObjectId());
        if (r.getPeeledObjectId() != null)
          have.add(r.getPeeledObjectId());
      }
      writer.preparePack(monitor, need, have);

      // We don't have to continue further if the pack will
      // be an empty pack, as the remote has all objects it
      // needs to complete this change.
      //
View Full Code Here

Examples of org.eclipse.jgit.internal.storage.pack.PackWriter.preparePack()

      PackWriter pw = new PackWriter(db);
      try {
        Set<ObjectId> all = new HashSet<ObjectId>();
        for (Ref r : db.getAllRefs().values())
          all.add(r.getObjectId());
        pw.preparePack(m, all, Collections.<ObjectId> emptySet());

        final ObjectId name = pw.computeName();
        OutputStream out;

        pack = nameFor(odb, name, ".pack");
View Full Code Here

Examples of org.eclipse.jgit.internal.storage.pack.PackWriter.preparePack()

    PackWriter pw = new PackWriter(repo);
    pw.setDeltaBaseAsOffset(true);
    pw.setReuseDeltaCommits(false);
    for (ObjectIdSet idx : excludeObjects)
      pw.excludeObjects(idx);
    pw.preparePack(NullProgressMonitor.INSTANCE, want,
        Collections.<ObjectId> emptySet());
    String id = pw.computeName().getName();
    File packdir = new File(repo.getObjectsDirectory(), "pack");
    File packFile = new File(packdir, "pack-" + id + ".pack");
    FileOutputStream packOS = new FileOutputStream(packFile);
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.