230231232233234235236237238239240
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())
246247248249250251252253254255256
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())
279280281282283284285286287288289
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)
181182183184185186187188189190191
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);
195196197198199200201202203204205
if (rollback) objdb.rollbackPack(Collections.singletonList(pack)); } } finally { if (pw != null) pw.release(); } } finally { ctx.release(); } }
233234235236237238239240241242243
249250251252253254255256257258259
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())
278279280281282283284285286287288
pm.endTask(); } if (0 < pw.getObjectCount()) writePack(UNREACHABLE_GARBAGE, pw, pm); } finally { pw.release(); } } private boolean anyPackHas(AnyObjectId id) { for (PackWriter.ObjectIdSet packedObjs : newPackObj)
712713714715716717718719720721722
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(); }
12041205120612071208120912101211121212131214
msgOut.write(Constants.encode(msg)); msgOut.flush(); } } finally { pw.release(); } if (sideband) pckOut.end();