Package org.eclipse.jgit.transport

Examples of org.eclipse.jgit.transport.PackParser$DeltaVisit


  @Override
  protected void run() throws Exception {
    BufferedInputStream in = new BufferedInputStream(System.in);
    ObjectInserter inserter = db.newObjectInserter();
    try {
      PackParser p = inserter.newPackParser(in);
      p.setAllowThin(fixThin);
      if (indexVersion != -1 && p instanceof ObjectDirectoryPackParser) {
        ObjectDirectoryPackParser imp = (ObjectDirectoryPackParser) p;
        imp.setIndexVersion(indexVersion);
      }
      p.parse(new TextProgressMonitor());
      inserter.flush();
    } finally {
      inserter.release();
    }
  }
View Full Code Here


    }

    void downloadPack(final ProgressMonitor monitor) throws IOException {
      String name = "pack/" + packName;
      WalkRemoteObjectDatabase.FileStream s = connection.open(name);
      PackParser parser = inserter.newPackParser(s.in);
      parser.setAllowThin(false);
      parser.setObjectChecker(objCheck);
      parser.setLockMessage(lockMessage);
      PackLock lock = parser.parse(monitor);
      if (lock != null)
        packLocks.add(lock);
      inserter.flush();
    }
View Full Code Here

  @Override
  protected void run() throws Exception {
    BufferedInputStream in = new BufferedInputStream(ins);
    ObjectInserter inserter = db.newObjectInserter();
    try {
      PackParser p = inserter.newPackParser(in);
      p.setAllowThin(fixThin);
      if (indexVersion != -1 && p instanceof ObjectDirectoryPackParser) {
        ObjectDirectoryPackParser imp = (ObjectDirectoryPackParser) p;
        imp.setIndexVersion(indexVersion);
      }
      p.parse(new TextProgressMonitor());
      inserter.flush();
    } finally {
      inserter.release();
    }
  }
View Full Code Here

    objectHeader(pack, Constants.OBJ_REF_DELTA, delta3.length);
    id2.copyRawTo(pack);
    deflate(pack, delta3);

    digest(pack);
    PackParser ip = index(pack.toByteArray());
    ip.setAllowThin(true);
    ip.parse(NullProgressMonitor.INSTANCE);

    assertTrue("has blob", wc.has(id3));

    ObjectLoader ol = wc.open(id3);
    assertNotNull("created loader", ol);
View Full Code Here

  private void verifyOpenPack(final boolean thin) throws IOException {
    final byte[] packData = os.toByteArray();

    if (thin) {
      PackParser p = index(packData);
      try {
        p.parse(NullProgressMonitor.INSTANCE);
        fail("indexer should grumble about missing object");
      } catch (IOException x) {
        // expected
      }
    }

    ObjectDirectoryPackParser p = (ObjectDirectoryPackParser) index(packData);
    p.setKeepEmpty(true);
    p.setAllowThin(thin);
    p.setIndexVersion(2);
    p.parse(NullProgressMonitor.INSTANCE);
    pack = p.getPackFile();
    assertNotNull("have PackFile after parsing", pack);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.transport.PackParser$DeltaVisit

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.