Package org.tmatesoft.hg.core

Examples of org.tmatesoft.hg.core.HgStatusCommand.execute()


        cmd.base(Integer.parseInt(revisions.get(size - 2))).revision(Integer.parseInt(revisions.get(size - 1)));
      } else if (size > 0) {
        cmd.base(Integer.parseInt(revisions.get(0)));
      }
    }
    cmd.execute(statusHandler);
    statusHandler.dump();
  }
}
View Full Code Here


    HgStatusCommand cmd = new HgStatusCommand(repo).all();
    TestStatus.StatusCollector sc;

    eh.run("hg", "status", "-A", "-S");
    cmd.subrepo(true);
    cmd.execute(sc = new TestStatus.StatusCollector());
    sr.report("status -A -S", sc);
   
    eh.run("hg", "status", "-A", "-S");
    cmd.subrepo(false);
    cmd.execute(sc = new TestStatus.StatusCollector());
View Full Code Here

    cmd.execute(sc = new TestStatus.StatusCollector());
    sr.report("status -A -S", sc);
   
    eh.run("hg", "status", "-A", "-S");
    cmd.subrepo(false);
    cmd.execute(sc = new TestStatus.StatusCollector());
    sr.report("status -A", sc);
   
  }
 
}
View Full Code Here

  public void testStatusCommand() throws Exception {
    final HgStatusCommand sc = new HgStatusCommand(repo).all();
    StatusCollector r;
    statusParser.reset();
    eh.run("hg", "status", "-A");
    sc.execute(r = new StatusCollector());
    sr.report("hg status -A", r);
    //
    statusParser.reset();
    int revision = 3;
    eh.run("hg", "status", "-A", "--rev", String.valueOf(revision));
View Full Code Here

    repo = Configuration.get().find("status-1");
    HgStatusCommand cmd = new HgStatusCommand(repo);
    cmd.base(3).revision(8).all();
    cmd.match(new PathGlobMatcher("dir/*"));
    StatusCollector sc = new StatusCollector();
    cmd.execute(sc);
    assertTrue(sc.getErrors().isEmpty());
    final Path file3 = Path.create("dir/file3");
    final Path file4 = Path.create("dir/file4");
    final Path file5 = Path.create("dir/file5");
    //
View Full Code Here

  public void testOnEmptyRepositoryWithAllFilesDeleted() throws Exception {
    repo = Configuration.get().find("status-2");
    HgStatusCommand cmd = new HgStatusCommand(repo);
    cmd.all();
    StatusCollector sc = new StatusCollector();
    cmd.execute(sc);
    // shall pass without exception
    assertTrue(sc.getErrors().isEmpty());
    for (HgStatus.Kind k : HgStatus.Kind.values()) {
      assertTrue("Kind " + k.name() + " shall be empty", sc.get(k).isEmpty());
    }
View Full Code Here

  public void testOnEmptyRepositoryWithAllFilesDeletedInBranch() throws Exception {
    repo = Configuration.get().find("status-3");
    HgStatusCommand cmd = new HgStatusCommand(repo);
    cmd.all();
    StatusCollector sc = new StatusCollector();
    cmd.execute(sc);
    // shall pass without exception
    assertTrue(sc.getErrors().isEmpty());
    for (HgStatus.Kind k : HgStatus.Kind.values()) {
      assertTrue("Kind " + k.name() + " shall be empty", sc.get(k).isEmpty());
    }
View Full Code Here

  public void testImportedRepoWithOddManifestRevisions() throws Exception {
    repo = Configuration.get().find("status-4");
    HgStatusCommand cmd = new HgStatusCommand(repo);
    cmd.all();
    StatusCollector sc = new StatusCollector();
    cmd.execute(sc);
    // shall pass without exception
    assertTrue(sc.getErrors().isEmpty());
  }

  /**
 
View Full Code Here

    f3.setLastModified(System.currentTimeMillis());
    //
    HgStatusCommand cmd = new HgStatusCommand(repo);
    cmd.all();
    StatusCollector sc = new StatusCollector();
    cmd.execute(sc);
    // shall pass without exception
    //
    for (Map.Entry<Path, Outcome> e : sc.getErrors().entrySet()) {
      System.out.printf("%s : (%s %s)\n", e.getKey(), e.getValue().getKind(), e.getValue().getMessage());
    }
View Full Code Here

    f2.setLastModified(System.currentTimeMillis());
    //
    HgStatusCommand cmd = new HgStatusCommand(repo);
    cmd.all();
    StatusCollector sc = new StatusCollector();
    cmd.execute(sc);
    // shall pass without exception
    //
    for (Map.Entry<Path, Outcome> e : sc.getErrors().entrySet()) {
      System.out.printf("%s : (%s %s)\n", e.getKey(), e.getValue().getKind(), e.getValue().getMessage());
    }
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.