Examples of HgInitCommand


Examples of org.tmatesoft.hg.core.HgInitCommand

public class RepoUtils {

  static File initEmptyTempRepo(String dirName) throws IOException, HgException {
    File dest = createEmptyDir(dirName);
    try {
      new HgInitCommand().location(dest).revlogV1().execute();
    } catch (CancelledException ex) {
      Assert.fail(ex.toString());
    }
    return dest;
  }
View Full Code Here

Examples of org.tmatesoft.hg.core.HgInitCommand

  }
 
  @Test
  public void testInitEmpty() throws Exception {
    File repoLoc = RepoUtils.createEmptyDir("test-init");
    new HgInitCommand().location(repoLoc).revlogV1().dotencode(false).fncache(false).execute();
   
    int requires = new RepoInitializer().initRequiresFromFile(new File(repoLoc, ".hg")).getRequires();
    errorCollector.assertTrue(0 != (requires & REVLOGV1));
    errorCollector.assertTrue(0 != (requires & STORE));
    errorCollector.assertTrue(0 == (requires & DOTENCODE));
View Full Code Here

Examples of org.tmatesoft.hg.core.HgInitCommand

   */
  @Test
  public void testLocalScenario1() throws Exception {
    File repoLoc = RepoUtils.createEmptyDir("composite-scenario-1");
    // init empty
    HgRepository hgRepo = new HgInitCommand().location(repoLoc).revlogV1().execute();
    assertFalse("[sanity]", hgRepo.isInvalid());
    assertEquals("[sanity]", 0, hgRepo.getChangelog().getRevisionCount());
    // add 2 files
    Path fa = Path.create("a"), fb = Path.create("b");
    final File fileA = new File(repoLoc, fa.toString());
View Full Code Here

Examples of org.tmatesoft.hg.core.HgInitCommand

  }

  @Test
  public void testMergeAndCommit() throws Exception {
    File repoLoc = RepoUtils.createEmptyDir("composite-scenario-2");
    HgRepository hgRepo = new HgInitCommand().location(repoLoc).revlogV1().execute();
    Path fa = Path.create("file1"), fb = Path.create("file2"), fc = Path.create("file3");
    final File fileA = new File(repoLoc, fa.toString());
    final File fileB = new File(repoLoc, fb.toString());
    // rev0: +file1, +file2
    RepoUtils.createFile(fileA, "first file");
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.