Examples of PackConfig


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

  protected boolean requiresRepository() {
    return false;
  }

  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();
      packConfig.fromConfig(cfg);
    }

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

    final org.eclipse.jgit.transport.Daemon d;

    d = new org.eclipse.jgit.transport.Daemon(
        host != null ? new InetSocketAddress(host, port)
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

      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

   *             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

   *
   * @return the pack configuration. Never null.
   */
  public PackConfig getPackConfig() {
    if (packConfig == null)
      packConfig = new PackConfig(local);
    return packConfig;
  }
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

  TransferConfig(@GerritServerConfig final Config cfg) {
    timeout = (int) ConfigUtil.getTimeUnit(cfg, "transfer", null, "timeout", //
        0, TimeUnit.SECONDS);
    maxObjectSizeLimit = cfg.getLong("receive", "maxObjectSizeLimit", 0);

    packConfig = new PackConfig();
    packConfig.setDeltaCompress(false);
    packConfig.setThreads(1);
    packConfig.fromConfig(cfg);
  }
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 the pack configuration. Never null.
   */
  public PackConfig getPackConfig() {
    if (packConfig == null)
      packConfig = new PackConfig(local);
    return packConfig;
  }
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
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.