Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.Tree.addEntry()


  @Test
  public void test021_createTreeTag() throws IOException {
    final ObjectId emptyId = insertEmptyBlob();
    final Tree almostEmptyTree = new Tree(db);
    almostEmptyTree.addEntry(new FileTreeEntry(almostEmptyTree, emptyId,
        "empty".getBytes(), false));
    final ObjectId almostEmptyTreeId = insertTree(almostEmptyTree);
    final TagBuilder t = new TagBuilder();
    t.setObjectId(almostEmptyTreeId, Constants.OBJ_TREE);
    t.setTag("test021");
View Full Code Here


  @Test
  public void test022_createCommitTag() throws IOException {
    final ObjectId emptyId = insertEmptyBlob();
    final Tree almostEmptyTree = new Tree(db);
    almostEmptyTree.addEntry(new FileTreeEntry(almostEmptyTree, emptyId,
        "empty".getBytes(), false));
    final ObjectId almostEmptyTreeId = insertTree(almostEmptyTree);
    final CommitBuilder almostEmptyCommit = new CommitBuilder();
    almostEmptyCommit.setAuthor(new PersonIdent(author, 1154236443000L,
        -2 * 60)); // not exactly the same
View Full Code Here

  @Test
  public void test023_createCommitNonAnullii() throws IOException {
    final ObjectId emptyId = insertEmptyBlob();
    final Tree almostEmptyTree = new Tree(db);
    almostEmptyTree.addEntry(new FileTreeEntry(almostEmptyTree, emptyId,
        "empty".getBytes(), false));
    final ObjectId almostEmptyTreeId = insertTree(almostEmptyTree);
    CommitBuilder commit = new CommitBuilder();
    commit.setTreeId(almostEmptyTreeId);
    commit.setAuthor(new PersonIdent("Joe H\u00e4cker", "joe@example.com",
View Full Code Here

  @Test
  public void test024_createCommitNonAscii() throws IOException {
    final ObjectId emptyId = insertEmptyBlob();
    final Tree almostEmptyTree = new Tree(db);
    almostEmptyTree.addEntry(new FileTreeEntry(almostEmptyTree, emptyId,
        "empty".getBytes(), false));
    final ObjectId almostEmptyTreeId = insertTree(almostEmptyTree);
    CommitBuilder commit = new CommitBuilder();
    commit.setTreeId(almostEmptyTreeId);
    commit.setAuthor(new PersonIdent("Joe H\u00e4cker", "joe@example.com",
View Full Code Here

  }

  public void test021_createTreeTag() throws IOException {
    final ObjectId emptyId = new ObjectWriter(db).writeBlob(new byte[0]);
    final Tree almostEmptyTree = new Tree(db);
    almostEmptyTree.addEntry(new FileTreeEntry(almostEmptyTree, emptyId, "empty".getBytes(), false));
    final ObjectId almostEmptyTreeId = new ObjectWriter(db).writeTree(almostEmptyTree);
    final Tag t = new Tag(db);
    t.setObjId(almostEmptyTreeId);
    t.setType("tree");
    t.setTag("test021");
View Full Code Here

  }

  public void test022_createCommitTag() throws IOException {
    final ObjectId emptyId = new ObjectWriter(db).writeBlob(new byte[0]);
    final Tree almostEmptyTree = new Tree(db);
    almostEmptyTree.addEntry(new FileTreeEntry(almostEmptyTree, emptyId, "empty".getBytes(), false));
    final ObjectId almostEmptyTreeId = new ObjectWriter(db).writeTree(almostEmptyTree);
    final Commit almostEmptyCommit = new Commit(db);
    almostEmptyCommit.setAuthor(new PersonIdent(author, 1154236443000L, -2 * 60)); // not exactly the same
    almostEmptyCommit.setCommitter(new PersonIdent(author, 1154236443000L, -2 * 60));
    almostEmptyCommit.setMessage("test022\n");
 
View Full Code Here

  }

  public void test023_createCommitNonAnullii() throws IOException {
    final ObjectId emptyId = new ObjectWriter(db).writeBlob(new byte[0]);
    final Tree almostEmptyTree = new Tree(db);
    almostEmptyTree.addEntry(new FileTreeEntry(almostEmptyTree, emptyId, "empty".getBytes(), false));
    final ObjectId almostEmptyTreeId = new ObjectWriter(db).writeTree(almostEmptyTree);
    Commit commit = new Commit(db);
    commit.setTreeId(almostEmptyTreeId);
    commit.setAuthor(new PersonIdent("Joe H\u00e4cker","joe@example.com",4294967295000L,60));
    commit.setCommitter(new PersonIdent("Joe Hacker","joe2@example.com",4294967295000L,60));
View Full Code Here

  }

  public void test024_createCommitNonAscii() throws IOException {
    final ObjectId emptyId = new ObjectWriter(db).writeBlob(new byte[0]);
    final Tree almostEmptyTree = new Tree(db);
    almostEmptyTree.addEntry(new FileTreeEntry(almostEmptyTree, emptyId, "empty".getBytes(), false));
    final ObjectId almostEmptyTreeId = new ObjectWriter(db).writeTree(almostEmptyTree);
    Commit commit = new Commit(db);
    commit.setTreeId(almostEmptyTreeId);
    commit.setAuthor(new PersonIdent("Joe H\u00e4cker","joe@example.com",4294967295000L,60));
    commit.setCommitter(new PersonIdent("Joe Hacker","joe2@example.com",4294967295000L,60));
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.