Package org.eclipse.jgit.storage.pack

Examples of org.eclipse.jgit.storage.pack.PackWriter.release()


    try {
      pw.preparePack(pm, allHeads, Collections.<ObjectId> emptySet());
      if (0 < pw.getObjectCount())
        writePack(GC, pw, pm).setTips(allHeads);
    } finally {
      pw.release();
    }
  }

  private void packRest(ProgressMonitor pm) throws IOException {
    if (nonHeads.isEmpty() || objectsPacked == getObjectsBefore())
View Full Code Here


        pw.excludeObjects(pack.getPackIndex(ctx));
      pw.preparePack(pm, nonHeads, allHeads);
      if (0 < pw.getObjectCount())
        writePack(GC, pw, pm);
    } finally {
      pw.release();
    }
  }

  private void packGarbage(ProgressMonitor pm) throws IOException {
    if (objectsPacked == getObjectsBefore())
View Full Code Here

        pm.endTask();
      }
      if (0 < pw.getObjectCount())
        writePack(UNREACHABLE_GARBAGE, pw, pm);
    } finally {
      pw.release();
    }
  }

  private static boolean anyIndexHas(List<PackIndex> list, AnyObjectId id) {
    for (PackIndex idx : list)
View Full Code Here

        try {
          writePack(objdb, pack, pw, pm);
          writeIndex(objdb, pack, pw);

          PackWriter.Statistics stats = pw.getStatistics();
          pw.release();
          pw = null;

          pack.setPackStats(stats);
          objdb.commitPack(Collections.singletonList(pack), toPrune());
          newPacks.add(pack);
View Full Code Here

          if (rollback)
            objdb.rollbackPack(Collections.singletonList(pack));
        }
      } finally {
        if (pw != null)
          pw.release();
      }
    } finally {
      ctx.release();
    }
  }
View Full Code Here

    try {
      pw.preparePack(pm, allHeads, Collections.<ObjectId> emptySet());
      if (0 < pw.getObjectCount())
        writePack(GC, pw, pm).setTips(allHeads);
    } finally {
      pw.release();
    }
  }

  private void packRest(ProgressMonitor pm) throws IOException {
    if (nonHeads.isEmpty() || objectsPacked == getObjectsBefore())
View Full Code Here

        pw.excludeObjects(packedObjs);
      pw.preparePack(pm, nonHeads, allHeads);
      if (0 < pw.getObjectCount())
        writePack(GC, pw, pm);
    } finally {
      pw.release();
    }
  }

  private void packGarbage(ProgressMonitor pm) throws IOException {
    if (objectsPacked == getObjectsBefore())
View Full Code Here

        pm.endTask();
      }
      if (0 < pw.getObjectCount())
        writePack(UNREACHABLE_GARBAGE, pw, pm);
    } finally {
      pw.release();
    }
  }

  private boolean anyPackHas(AnyObjectId id) {
    for (PackWriter.ObjectIdSet packedObjs : newPackObj)
View Full Code Here

        if (delete && tmpIdx.exists())
          tmpIdx.delete();
      }
      return repo.getObjectDatabase().openPack(realPack);
    } finally {
      pw.release();
      if (tmpPack != null && tmpPack.exists())
        tmpPack.delete();
      if (tmpIdx != null && tmpIdx.exists())
        tmpIdx.delete();
    }
View Full Code Here

        msgOut.write(Constants.encode(msg));
        msgOut.flush();
      }

    } finally {
      pw.release();
    }

    if (sideband)
      pckOut.end();
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.