Examples of writeBlob()


Examples of org.eclipse.jgit.lib.ObjectWriter.writeBlob()

public class TreeWalkBasicDiffTest extends RepositoryTestCase {
  public void testMissingSubtree_DetectFileAdded_FileModified()
      throws Exception {
    final ObjectWriter ow = new ObjectWriter(db);
    final ObjectId aFileId = ow.writeBlob("a".getBytes());
    final ObjectId bFileId = ow.writeBlob("b".getBytes());
    final ObjectId cFileId1 = ow.writeBlob("c-1".getBytes());
    final ObjectId cFileId2 = ow.writeBlob("c-2".getBytes());

    // Create sub-a/empty, sub-c/empty = hello.
    final ObjectId oldTree;
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectWriter.writeBlob()

  public void testMissingSubtree_DetectFileAdded_FileModified()
      throws Exception {
    final ObjectWriter ow = new ObjectWriter(db);
    final ObjectId aFileId = ow.writeBlob("a".getBytes());
    final ObjectId bFileId = ow.writeBlob("b".getBytes());
    final ObjectId cFileId1 = ow.writeBlob("c-1".getBytes());
    final ObjectId cFileId2 = ow.writeBlob("c-2".getBytes());

    // Create sub-a/empty, sub-c/empty = hello.
    final ObjectId oldTree;
    {
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectWriter.writeBlob()

      throws Exception {
    final ObjectWriter ow = new ObjectWriter(db);
    final ObjectId aFileId = ow.writeBlob("a".getBytes());
    final ObjectId bFileId = ow.writeBlob("b".getBytes());
    final ObjectId cFileId1 = ow.writeBlob("c-1".getBytes());
    final ObjectId cFileId2 = ow.writeBlob("c-2".getBytes());

    // Create sub-a/empty, sub-c/empty = hello.
    final ObjectId oldTree;
    {
      final Tree root = new Tree(db);
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectWriter.writeBlob()

  private RevObject writeBlob(final Repository repo, final String data)
      throws IOException {
    final RevWalk revWalk = new RevWalk(repo);
    final byte[] bytes = Constants.encode(data);
    final ObjectWriter ow = new ObjectWriter(repo);
    final ObjectId id = ow.writeBlob(bytes);
    try {
      parse(id);
      fail("Object " + id.name() + " should not exist in test repository");
    } catch (MissingObjectException e) {
      // Ok
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectWriter.writeBlob()

            if (f != null) { // the file exists
              DirCacheEntry entry = new DirCacheEntry(path);
              entry.setLength((int)f.getEntryLength());
              entry.setLastModified(f.getEntryLastModified());
              entry.setFileMode(f.getEntryFileMode());
              entry.setObjectId(ow.writeBlob(file));

              builder.add(entry);
              lastAddedFile = path;
            } else if (!update){
              c = tw.getTree(0, DirCacheIterator.class);
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.