Package org.eclipse.jgit.storage.pack

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


      writer.setReuseValidatingObjects(false);
      writer.setDeltaBaseAsOffset(capableOfsDelta);
      writer.preparePack(monitor, newObjects, remoteObjects);
      writer.writePack(monitor, monitor, out);
    } finally {
      writer.release();
    }
    packTransferTime = writer.getStatistics().getTimeWriting();
  }

  private void readStatusReport(final Map<String, RemoteRefUpdate> refUpdates)
View Full Code Here


      safeDelete(pathIdx);
      safeDelete(pathPack);

      throw new TransportException(uri, JGitText.get().cannotStoreObjects, err);
    } finally {
      writer.release();
    }
  }

  private void safeDelete(final String path) {
    if (path != null) {
View Full Code Here

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

    } finally {
      pw.release();
    }

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

      writer.setReuseValidatingObjects(false);
      writer.setDeltaBaseAsOffset(capableOfsDelta);
      writer.preparePack(monitor, newObjects, remoteObjects);
      writer.writePack(monitor, monitor, out);
    } finally {
      writer.release();
    }
    packTransferTime = writer.getStatistics().getTimeWriting();
  }

  private void readStatusReport(final Map<String, RemoteRefUpdate> refUpdates)
View Full Code Here

      safeDelete(pathIdx);
      safeDelete(pathPack);

      throw new TransportException(uri, JGitText.get().cannotStoreObjects, err);
    } finally {
      writer.release();
    }
  }

  private void safeDelete(final String path) {
    if (path != null) {
View Full Code Here

      w.write('\n');
      w.flush();
      packWriter.writePack(monitor, monitor, os);
    } finally {
      packWriter.release();
    }
  }
}
View Full Code Here

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

    } finally {
      pw.release();
    }

    if (sideband)
      pckOut.end();
View Full Code Here

        if (delete && tmpIdx.exists())
          tmpIdx.delete();
      }
      return repo.getObjectDatabase().openPack(realPack, realIdx);
    } finally {
      pw.release();
      if (tmpPack != null && tmpPack.exists())
        tmpPack.delete();
      if (tmpIdx != null && tmpIdx.exists())
        tmpIdx.delete();
    }
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.