Package org.tmatesoft.hg.core

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


    assertTrue(sc.get(file1).contains(Unknown));
    assertTrue(sc.get(file1).contains(Removed));
    assertTrue(sc.get(file1).size() == 2);
    //
    // no file1 in rev 2, shall be reported as unknown only
    cmd.base(2).execute(sc = new StatusCollector());
    assertTrue(sc.getErrors().isEmpty());
    assertTrue(sc.get(file1).contains(Unknown));
    assertTrue(sc.get(file1).size() == 1);
  }
View Full Code Here


  @Test
  public void testScopeInHistoricalStatus() throws Exception {
    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");
View Full Code Here

      sr.report("hg status -C --change " + r, sc);
    }
    // a and d from r5 are missing in r3
    statusParser.reset();
    eh.run("hg", "status", "-C", "--rev", "3", "--rev", "5");
    cmd.base(3).revision(5).execute(sc = new StatusCollector());
    sr.report("hg status -C 3..5 ", sc);
    //
    // a is c which is initially b
    // d is b which is initially a
    Path fa = Path.create("a");
View Full Code Here

    Path fd = Path.create("d");
    // neither initial a nor b have isCopy(() == true
    assertFalse("[sanity]", repo.getFileNode(fa).isCopy());
    // check HgStatusCollector
    // originals (base revision) doesn't contain first copy origin (there's no b in r2)
    cmd.base(2).revision(5).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
    errorCollector.assertEquals(Collections.singletonList(Removed), sc.get(fc));
    // ensure same result with HgWorkingCopyStatusCollector
    cmd.base(2).revision(WORKING_COPY).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
View Full Code Here

    // originals (base revision) doesn't contain first copy origin (there's no b in r2)
    cmd.base(2).revision(5).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
    errorCollector.assertEquals(Collections.singletonList(Removed), sc.get(fc));
    // ensure same result with HgWorkingCopyStatusCollector
    cmd.base(2).revision(WORKING_COPY).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
    errorCollector.assertEquals(Collections.singletonList(Removed), sc.get(fc));
    // originals (base revision) does contain first copy origin (b is in r1)
    cmd.base(1).revision(5).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
View Full Code Here

    // ensure same result with HgWorkingCopyStatusCollector
    cmd.base(2).revision(WORKING_COPY).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
    errorCollector.assertEquals(Collections.singletonList(Removed), sc.get(fc));
    // originals (base revision) does contain first copy origin (b is in r1)
    cmd.base(1).revision(5).execute(sc = new StatusCollector());
    errorCollector.assertEquals(fa, sc.new2oldName.get(fd));
    errorCollector.assertEquals(Collections.singletonList(Removed), sc.get(fb));
  }

  /*
 
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.