Examples of chunks()


Examples of org.tmatesoft.hg.internal.FileRenameHistory.chunks()

      String fname = history[0].toString();
      HgDataFile df = repo.getFileNode(fname);
      Assert.assertFalse(frh.isOutOfRange(df, df.getLastRevision()));
      frh.build(df, df.getLastRevision());
      int recordIndex = 0;
      errorCollector.assertEquals(history.length / 5, frh.chunks());
      for (Chunk c : frh.iterate(HgIterateDirection.NewToOld)) {
        compareChunk(fname, c, history, recordIndex++);
      }
      errorCollector.assertEquals("Shall compare full history", history.length, recordIndex * 5);
    }
 
View Full Code Here

Examples of org.tmatesoft.hg.internal.FileRenameHistory.chunks()

    }
    //
    HgDataFile df = repo.getFileNode("d");
    Assert.assertFalse(frh.isOutOfRange(df, 0));
    frh.build(df, 0);
    errorCollector.assertEquals(1, frh.chunks());
    Chunk c = frh.iterate(NewToOld).iterator().next();
    compareChunk("abandoned d(0)", c, new Object[] { "d", 0, 0, 4, 4 }, 0);
    //
    df = repo.getFileNode("a");
    Assert.assertFalse(frh.isOutOfRange(df, 0));
View Full Code Here

Examples of org.tmatesoft.hg.internal.FileRenameHistory.chunks()

    compareChunk("abandoned d(0)", c, new Object[] { "d", 0, 0, 4, 4 }, 0);
    //
    df = repo.getFileNode("a");
    Assert.assertFalse(frh.isOutOfRange(df, 0));
    frh.build(df, 0);
    errorCollector.assertEquals(1, frh.chunks());
    c = frh.iterate(NewToOld).iterator().next();
    compareChunk("a(0) and boundary checks", c, new Object[] { "a", 0, 0, 0, 0 }, 0);
    //
    repo = Configuration.get().find("test-annotate"); // need a long file history
    df = repo.getFileNode("file1");
View Full Code Here

Examples of org.tmatesoft.hg.internal.FileRenameHistory.chunks()

    df = repo.getFileNode("file1");
    Assert.assertTrue("[sanity]", repo.getChangelog().getLastRevision() >=9);
    Assert.assertTrue("[sanity]", df.exists() && df.getLastRevision() >= 9);
    frh = new FileRenameHistory(0, 9);
    frh.build(df, 9);
    errorCollector.assertEquals(1, frh.chunks());
    c = frh.iterate(NewToOld).iterator().next();
    compareChunk("regular file, no renames", c, new Object[] { "file1", 0, 9, 0, 9 }, 0);
    // restricted range
    frh = new FileRenameHistory(3, 6);
    Assert.assertFalse(frh.isOutOfRange(df, 9));
View Full Code Here

Examples of org.tmatesoft.hg.internal.FileRenameHistory.chunks()

    compareChunk("regular file, no renames", c, new Object[] { "file1", 0, 9, 0, 9 }, 0);
    // restricted range
    frh = new FileRenameHistory(3, 6);
    Assert.assertFalse(frh.isOutOfRange(df, 9));
    frh.build(df, 9); // start from out of range revision
    errorCollector.assertEquals(1, frh.chunks());
    c = frh.iterate(OldToNew).iterator().next();
    compareChunk("regular file, no renames, in range 3..6", c, new Object[] { "file1", 3, 6, 3, 6 }, 0);
  }
 
  private void compareChunk(String msg, Chunk chunk, Object[] expected, int recordOffset) {
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.