Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.ObjectDatabase


    sendPlainText(packList(req), req, rsp);
  }

  private static String packList(final HttpServletRequest req) {
    final StringBuilder out = new StringBuilder();
    final ObjectDatabase db = getRepository(req).getObjectDatabase();
    if (db instanceof ObjectDirectory) {
      for (PackFile pack : ((ObjectDirectory) db).getPacks()) {
        out.append("P ");
        out.append(pack.getPackFile().getName());
        out.append('\n');
View Full Code Here


    final ObjectId cmtid = ObjectId
        .fromString("9208b2459ea6609a5af68627cc031796d0d9329b");
    assertEquals(cmtid, actid);

    // Verify the commit we just wrote is in the correct format.
    ObjectDatabase odb = db.getObjectDatabase();
    assertTrue("is ObjectDirectory", odb instanceof ObjectDirectory);
    final XInputStream xis = new XInputStream(new FileInputStream(
        ((ObjectDirectory) odb).fileFor(cmtid)));
    try {
      assertEquals(0x78, xis.readUInt8());
View Full Code Here

    final ObjectId cmtid = ObjectId.fromString(
        "803aec4aba175e8ab1d666873c984c0308179099");
    assertEquals(cmtid, c.getCommitId());

    // Verify the commit we just wrote is in the correct format.
    ObjectDatabase odb = db.getObjectDatabase();
    assertTrue("is ObjectDirectory", odb instanceof ObjectDirectory);
    final XInputStream xis = new XInputStream(new FileInputStream(
        ((ObjectDirectory) odb).fileFor(cmtid)));
    try {
      assertEquals(0x78, xis.readUInt8());
View Full Code Here

    sendPlainText(packList(req), req, rsp);
  }

  private static String packList(final HttpServletRequest req) {
    final StringBuilder out = new StringBuilder();
    final ObjectDatabase db = getRepository(req).getObjectDatabase();
    if (db instanceof ObjectDirectory) {
      for (PackFile pack : ((ObjectDirectory) db).getPacks()) {
        out.append("P ");
        out.append(pack.getPackFile().getName());
        out.append('\n');
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.lib.ObjectDatabase

Copyright © 2018 www.massapicom. 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.