Examples of PackConfig


Examples of org.eclipse.jgit.storage.pack.PackConfig

            SideBandOutputStream.CH_PROGRESS, bufsz, rawOut);
        pm = new SideBandProgressMonitor(msgOut);
      }
    }

    PackConfig cfg = packConfig;
    if (cfg == null)
      cfg = new PackConfig(db);
    final PackWriter pw = new PackWriter(cfg, walk.getObjectReader());
    try {
      pw.setUseCachedPacks(true);
      pw.setDeltaBaseAsOffset(options.contains(OPTION_OFS_DELTA));
      pw.setThin(options.contains(OPTION_THIN_PACK));
View Full Code Here

Examples of org.eclipse.jgit.storage.pack.PackConfig

        err.flush();
      }
      throw noPack;
    }

    PackConfig cfg = packConfig;
    if (cfg == null)
      cfg = new PackConfig(db);
    final PackWriter pw = new PackWriter(cfg, walk.getObjectReader());
    try {
      pw.setUseCachedPacks(true);
      pw.setReuseDeltaCommits(true);
      pw.setDeltaBaseAsOffset(options.contains(OPTION_OFS_DELTA));
View Full Code Here

Examples of org.eclipse.jgit.storage.pack.PackConfig

              return -1;
            return Integer.signum(o1.hashCode() - o2.hashCode());
          }

        });
    PackWriter pw = new PackWriter((pconfig == null) ? new PackConfig(repo) : pconfig, repo.newObjectReader());
    try {
      // prepare the PackWriter
      pw.setDeltaBaseAsOffset(true);
      pw.setReuseDeltaCommits(false);
      if (tagTargets != null)
View Full Code Here

Examples of org.eclipse.jgit.storage.pack.PackConfig

    return false;
  }

  @Override
  protected void run() throws Exception {
    PackConfig packConfig = new PackConfig();

    if (configFile != null) {
      if (!configFile.exists()) {
        throw die(MessageFormat.format(
            CLIText.get().configFileNotFound, //
            configFile.getAbsolutePath()));
      }

      FileBasedConfig cfg = new FileBasedConfig(configFile, FS.DETECTED);
      cfg.load();
      new WindowCacheConfig().fromConfig(cfg).install();
      packConfig.fromConfig(cfg);
    }

    int threads = packConfig.getThreads();
    if (threads <= 0)
      threads = Runtime.getRuntime().availableProcessors();
    if (1 < threads)
      packConfig.setExecutor(Executors.newFixedThreadPool(threads));

    final FileResolver<DaemonClient> resolver = new FileResolver<DaemonClient>();
    for (final File f : directory) {
      outw.println(MessageFormat.format(CLIText.get().exporting, f.getAbsolutePath()));
      resolver.exportDirectory(f);
View Full Code Here

Examples of org.eclipse.jgit.storage.pack.PackConfig

        err.flush();
      }
      throw noPack;
    }

    PackConfig cfg = packConfig;
    if (cfg == null)
      cfg = new PackConfig(db);
    final PackWriter pw = new PackWriter(cfg, walk.getObjectReader());
    try {
      pw.setIndexDisabled(true);
      pw.setUseCachedPacks(true);
      pw.setUseBitmaps(depth == 0 && clientShallowCommits.isEmpty());
View Full Code Here

Examples of org.eclipse.jgit.storage.pack.PackConfig

    objdb = repo.getObjectDatabase();
    newPackDesc = new ArrayList<DfsPackDescription>(4);
    newPackStats = new ArrayList<PackWriter.Statistics>(4);
    newPackObj = new ArrayList<PackWriter.ObjectIdSet>(4);

    packConfig = new PackConfig(repo);
    packConfig.setIndexVersion(2);
  }
View Full Code Here

Examples of org.eclipse.jgit.storage.pack.PackConfig

    }
  }

  private void packGarbage(ProgressMonitor pm) throws IOException {
    // TODO(sop) This is ugly. The garbage pack needs to be deleted.
    PackConfig cfg = new PackConfig(packConfig);
    cfg.setReuseDeltas(true);
    cfg.setReuseObjects(true);
    cfg.setDeltaCompress(false);
    cfg.setBuildBitmaps(false);

    PackWriter pw = new PackWriter(cfg, ctx);
    pw.setDeltaBaseAsOffset(true);
    pw.setReuseDeltaCommits(true);
    try {
View Full Code Here

Examples of org.eclipse.jgit.storage.pack.PackConfig

   *             the bundle, or writing compressed object data to the output
   *             stream.
   */
  public void writeBundle(ProgressMonitor monitor, OutputStream os)
      throws IOException {
    PackConfig pc = packConfig;
    if (pc == null)
      pc = new PackConfig(db);
    PackWriter packWriter = new PackWriter(pc, db.newObjectReader());
    try {
      final HashSet<ObjectId> inc = new HashSet<ObjectId>();
      final HashSet<ObjectId> exc = new HashSet<ObjectId>();
      inc.addAll(include.values());
View Full Code Here

Examples of org.eclipse.jgit.storage.pack.PackConfig

      pm = NullProgressMonitor.INSTANCE;

    DfsObjDatabase objdb = repo.getObjectDatabase();
    DfsReader ctx = (DfsReader) objdb.newReader();
    try {
      PackConfig pc = new PackConfig(repo);
      pc.setIndexVersion(2);
      pc.setDeltaCompress(false);
      pc.setReuseDeltas(true);
      pc.setReuseObjects(true);

      PackWriter pw = new PackWriter(pc, ctx);
      try {
        pw.setDeltaBaseAsOffset(true);
        pw.setReuseDeltaCommits(false);
View Full Code Here

Examples of org.eclipse.jgit.storage.pack.PackConfig

   *
   * @param reader
   *            reader to read from the repository with.
   */
  public PackWriter(final ObjectReader reader) {
    this(new PackConfig(), reader);
  }
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.