Examples of changeset()


Examples of org.tmatesoft.hg.core.HgCatCommand.changeset()

    assertArrayEquals(sink2.toArray(), sink1.toArray());
    //
    // d from wc/tip was a in 0..2 and b in rev 3..4. Besides, there's another d in r4
    cmd2.file(Path.create("d"));
    cmd1.changeset(2).execute(sink1 = new ByteArrayChannel());
    cmd2.changeset(2).execute(sink2 = new ByteArrayChannel());
    assertArrayEquals(sink1.toArray(), sink2.toArray());
    //
    cmd1.file(Path.create("b"));
    cmd1.changeset(3).execute(sink1 = new ByteArrayChannel());
    cmd2.changeset(3).execute(sink2 = new ByteArrayChannel());
View Full Code Here

Examples of org.tmatesoft.hg.core.HgCatCommand.changeset()

    cmd2.changeset(2).execute(sink2 = new ByteArrayChannel());
    assertArrayEquals(sink1.toArray(), sink2.toArray());
    //
    cmd1.file(Path.create("b"));
    cmd1.changeset(3).execute(sink1 = new ByteArrayChannel());
    cmd2.changeset(3).execute(sink2 = new ByteArrayChannel());
    assertArrayEquals(sink1.toArray(), sink2.toArray());
    //
    cmd2.changeset(4).execute(sink2 = new ByteArrayChannel()); // ensure d in r4 is not from a or b
    assertArrayEquals("d:4\n".getBytes(), sink2.toArray());
    cmd2.changeset(5).execute(sink2 = new ByteArrayChannel()); // d in r5 is copy of b in r4
View Full Code Here

Examples of org.tmatesoft.hg.core.HgCatCommand.changeset()

    cmd1.file(Path.create("b"));
    cmd1.changeset(3).execute(sink1 = new ByteArrayChannel());
    cmd2.changeset(3).execute(sink2 = new ByteArrayChannel());
    assertArrayEquals(sink1.toArray(), sink2.toArray());
    //
    cmd2.changeset(4).execute(sink2 = new ByteArrayChannel()); // ensure d in r4 is not from a or b
    assertArrayEquals("d:4\n".getBytes(), sink2.toArray());
    cmd2.changeset(5).execute(sink2 = new ByteArrayChannel()); // d in r5 is copy of b in r4
    cmd1.changeset(4).execute(sink1 = new ByteArrayChannel());
    assertArrayEquals(sink1.toArray(), sink2.toArray());
  }
View Full Code Here

Examples of org.tmatesoft.hg.core.HgCatCommand.changeset()

    cmd2.changeset(3).execute(sink2 = new ByteArrayChannel());
    assertArrayEquals(sink1.toArray(), sink2.toArray());
    //
    cmd2.changeset(4).execute(sink2 = new ByteArrayChannel()); // ensure d in r4 is not from a or b
    assertArrayEquals("d:4\n".getBytes(), sink2.toArray());
    cmd2.changeset(5).execute(sink2 = new ByteArrayChannel()); // d in r5 is copy of b in r4
    cmd1.changeset(4).execute(sink1 = new ByteArrayChannel());
    assertArrayEquals(sink1.toArray(), sink2.toArray());
  }
}
View Full Code Here

Examples of org.tmatesoft.hg.core.HgChangesetFileSneaker.changeset()

    fs1.followRenames(true);
    fs2.followRenames(true);
    Nodeid cset = hgRepo.getChangelog().getRevision(2);
    Path fname = Path.create("dir9/file9"); // close to the manifest end
    fs1.changeset(cset);
    fs2.changeset(cset);
//    hgRepo.getManifest().getFileRevision(TIP, fname);
    final long start1 = System.nanoTime();
    boolean e1 = fs1.checkExists(fname);
    final long end1 = System.nanoTime();
    boolean e2 = fs2.checkExists(fname);
View Full Code Here

Examples of org.tmatesoft.hg.core.HgChangesetFileSneaker.changeset()

    cmd.changeset(cset);
    final ByteArrayChannel sink = new ByteArrayChannel();
    cmd.execute(sink);
    final int result1 = sink.toArray().length;
    HgChangesetFileSneaker i = new HgChangesetFileSneaker(repo);
    boolean result = i.changeset(cset).checkExists(file);
    assertFalse(result);
    assertFalse(i.exists());
    result = i.followRenames(true).checkExists(file);
    assertTrue(result);
    assertTrue(i.exists());
View Full Code Here

Examples of org.tmatesoft.hg.core.HgCheckoutCommand.changeset()

    cmd.file(Path.create("a.txt")).execute();
  }
 
  private void testCheckout() throws Exception {
    HgCheckoutCommand coCmd = new HgCheckoutCommand(hgRepo);
    coCmd.changeset(17).execute();
  }
 
  private void tryExtensions() throws Exception {
    HgExtensionsManager em = hgRepo.getExtensions();
    if (!em.isEnabled(HgExt.Rebase)) {
View Full Code Here

Examples of org.tmatesoft.hg.core.HgDiffCommand.changeset()

    ExecHelper eh = new ExecHelper(gp, repo.getWorkingDir());
    eh.run("hg", "diff", "-c", "0", "-U", "0", df.getPath().toString());
    //
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    HgDiffCommand diffCmd = new HgDiffCommand(repo).file(df);
    diffCmd.changeset(0).executeParentsAnnotate(new DiffOutInspector(new PrintStream(bos)));
    //
    String[] apiResult = splitLines(bos.toString());
    String[] expected = splitLines(gp.result());
    Assert.assertArrayEquals(expected, apiResult);
  }
View Full Code Here

Examples of org.tmatesoft.hg.core.HgLogCommand.changeset()

    // hg parents cmd
    final Pair<Nodeid, Nodeid> wcParents = hgRepo.getWorkingCopyParents();
    ChangesetDumpHandler dump = new ChangesetDumpHandler(hgRepo);
    HgLogCommand cmd = new HgLogCommand(hgRepo);
    if (wcParents.hasFirst()) {
      cmd.changeset(wcParents.first()).execute(dump);
    }
    if (wcParents.hasSecond()) {
      cmd.changeset(wcParents.second()).execute(dump);
    }
    System.out.println("Branch:" + hgRepo.getWorkingCopyBranchName());
View Full Code Here

Examples of org.tmatesoft.hg.core.HgLogCommand.changeset()

    HgLogCommand cmd = new HgLogCommand(hgRepo);
    if (wcParents.hasFirst()) {
      cmd.changeset(wcParents.first()).execute(dump);
    }
    if (wcParents.hasSecond()) {
      cmd.changeset(wcParents.second()).execute(dump);
    }
    System.out.println("Branch:" + hgRepo.getWorkingCopyBranchName());
  }
 
  /*
 
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.