Examples of file()


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

    final String fname = "src/org/tmatesoft/hg/internal/PatchGenerator.java";
    final int checkChangeset = repo.getChangelog().getRevisionIndex(Nodeid.fromAscii("946b131962521f9199e1fedbdc2487d3aaef5e46")); // 539
    HgDataFile df = repo.getFileNode(fname);
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    HgDiffCommand diffCmd = new HgDiffCommand(repo);
    diffCmd.file(df).changeset(checkChangeset);
    diffCmd.executeParentsAnnotate(new DiffOutInspector(new PrintStream(bos)));
    LineGrepOutputParser gp = new LineGrepOutputParser("^@@.+");
    ExecHelper eh = new ExecHelper(gp, null);
    eh.run("hg", "diff", "-c", String.valueOf(checkChangeset), "-U", "0", fname);
    //
View Full Code Here

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

    } else {
      for (String fname : files) {
        HgDataFile f1 = hgRepo.getFileNode(fname);
        System.out.println("History of the file: " + f1.getPath());
        if (limit == -1) {
          cmd.file(f1.getPath(), true).execute(dump);
        } else {
          int[] r = new int[] { 0, f1.getRevisionCount() };
          if (fixRange(r, reverseOrder, limit) == 0) {
            System.out.println("No changes");
            continue;
View Full Code Here

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

  }

  private void buildFileLog() throws Exception {
    final long start = System.nanoTime();
    HgLogCommand cmd = new HgLogCommand(hgRepo);
    cmd.file("a2.txt", true, false);
    final int[] count = new int[] { 0 };
    class MyHandler implements HgChangesetTreeHandler, Adaptable {
      public void treeElement(HgChangesetTreeHandler.TreeElement entry) throws HgRuntimeException {
        StringBuilder sb = new StringBuilder();
        HashSet<Nodeid> test = new HashSet<Nodeid>(entry.childRevisions());
View Full Code Here

Examples of org.tmatesoft.hg.core.HgRevertCommand.file()

  }
 
 
  private void testRevert() throws Exception {
    HgRevertCommand cmd = new HgRevertCommand(hgRepo);
    cmd.file(Path.create("a.txt")).execute();
  }
 
  private void testCheckout() throws Exception {
    HgCheckoutCommand coCmd = new HgCheckoutCommand(hgRepo);
    coCmd.changeset(17).execute();
View Full Code Here

Examples of org.tmatesoft.hg.core.HgRevertCommand.file()

    assertEquals("[sanity]", 1, statusParser.getModified().size());
    assertEquals("[sanity]", 2, statusParser.getClean().size());
    assertEquals("[sanity]", targetFile, statusParser.getModified().get(0));
   
    HgRevertCommand cmd = new HgRevertCommand(repo);
    cmd.file(targetFile).execute();
    statusParser.reset();
    eh.run("hg", "status", "-A");

    errorCollector.assertEquals(3, statusParser.getClean().size());
    errorCollector.assertTrue(statusParser.getClean().contains(targetFile));
View Full Code Here

Examples of org.tmatesoft.hg.internal.FileRenameHistory.Chunk.file()

    Chunk c = frh.chunkAt(originalChangesetIndex);
    if (c == null) {
      // file rename history doesn't go deep up to changeset of interest
      return null;
    }
    Path nameAtOrigin = c.file().getPath();
    if (originals.contains(nameAtOrigin)) {
      return nameAtOrigin;
    }
    return null;
  }
View Full Code Here

Examples of org.tmatesoft.hg.util.FileWalker.file()

    FileWalker fw = new FileWalker(repo, testRepoLoc, pathSrc, null);
    int execFound, linkFound, regularFound;
    execFound = linkFound = regularFound = 0;
    while(fw.hasNext()) {
      fw.next();
      FileInfo fi = fw.file();
      boolean executable = fi.isExecutable();
      boolean symlink = fi.isSymlink();
      if (executable) {
        execFound++;
      }
View Full Code Here

Examples of org.tmatesoft.hg.util.FileWalker.file()

    boolean exec, link, file;
    exec = link = file = false;
    while (fw.hasNext()) {
      fw.next();
      FileInfo fi = fw.file();
      String fn = fw.name().toString();
      if (fn.equals("file-link")) {
        link = true;
        errorCollector.assertTrue("Symlink shall exist despite the fact it points to nowhere", fi.exists());
        errorCollector.assertFalse(fi.isExecutable());
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.