Package org.tmatesoft.hg.core

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


      return;
    }
    //
    HgStatusCommand cmd = hgRepo.createStatusCommand();
    if (cmdLineOpts.getBoolean("-A", "--all")) {
      cmd.all();
    } else {
      // default: mardu
      cmd.modified(cmdLineOpts.getBoolean(true, "-m", "--modified"));
      cmd.added(cmdLineOpts.getBoolean(true, "-a", "--added"));
      cmd.removed(cmdLineOpts.getBoolean(true, "-r", "--removed"));
View Full Code Here


  public void testRemovedAgainstBaseWithoutIt() throws Exception {
    // check very end of WCStatusCollector, foreach left knownEntry, collect == null || baseRevFiles.contains()
    repo = Configuration.get().find("status-1");
    HgStatusCommand cmd = new HgStatusCommand(repo);
    StatusCollector sc = new StatusCollector();
    cmd.all().base(7).execute(sc);
    assertTrue(sc.getErrors().isEmpty());
    Path file5 = Path.create("dir/file5");
    // shall not be listed at all
    assertTrue(sc.get(file5).isEmpty());
  }
View Full Code Here

  @Test
  public void testTrackedModifiedIgnored() throws Exception {
    repo = Configuration.get().find("status-1");
    HgStatusCommand cmd = new HgStatusCommand(repo);
    StatusCollector sc = new StatusCollector();
    cmd.all().execute(sc);
    assertTrue(sc.getErrors().isEmpty());
    final Path file2 = Path.create("file2");
    assertTrue(sc.get(file2).contains(Modified));
    assertTrue(sc.get(file2).size() == 1);
  }
View Full Code Here

  @Test
  public void testMarkedRemovedButStillInWC() throws Exception {
    repo = Configuration.get().find("status-1");
    HgStatusCommand cmd = new HgStatusCommand(repo);
    StatusCollector sc = new StatusCollector();
    cmd.all().execute(sc);
    assertTrue(sc.getErrors().isEmpty());
    Path file4 = Path.create("dir/file4");
    assertTrue(sc.get(file4).contains(Removed));
    assertTrue(sc.get(file4).size() == 1);
    //
View Full Code Here

  public void testRemovedIgnoredInWC() throws Exception {
    // check branch !known, ignored
    repo = Configuration.get().find("status-1");
    HgStatusCommand cmd = new HgStatusCommand(repo);
    StatusCollector sc = new StatusCollector();
    cmd.all().execute(sc);
    assertTrue(sc.getErrors().isEmpty());
    final Path file3 = Path.create("dir/file3");
    assertTrue(sc.get(file3).contains(Ignored));
    assertTrue(sc.get(file3).size() == 1);
    //
View Full Code Here

    // check branch !known, !ignored (=> unknown)
    repo = Configuration.get().find("status-1");
    HgStatusCommand cmd = new HgStatusCommand(repo);
    StatusCollector sc = new StatusCollector();
    cmd.base(1);
    cmd.all().execute(sc);
    assertTrue(sc.getErrors().isEmpty());
    final Path file1 = Path.create("file1");
    assertTrue(sc.get(file1).contains(Unknown));
    assertTrue(sc.get(file1).contains(Removed));
    assertTrue(sc.get(file1).size() == 2);
View Full Code Here

  public void testSubTreeStatus() throws Exception {
    repo = Configuration.get().find("status-1");
    HgStatusCommand cmd = new HgStatusCommand(repo);
    StatusCollector sc = new StatusCollector();
    cmd.match(new PathGlobMatcher("*"));
    cmd.all().execute(sc);
    assertTrue(sc.getErrors().isEmpty());
    /*
     * C .hgignore
     * ? file1
     * M file2
View Full Code Here

   */
  @Test
  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()) {
View Full Code Here

   */
  @Test
  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()) {
View Full Code Here

   */
  @Test
  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

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.