Examples of workingCopy()


Examples of com.aragost.javahg.Repository.workingCopy()

        StatusResult status2 = repo.workingCopy().parent2Status();
        Assert.assertTrue(status2.getRemoved().isEmpty());

        keepDeleteConflict.keep();
        Assert.assertTrue(a.exists());
        status1 = repo.workingCopy().status();
        Assert.assertTrue(status1.getRemoved().isEmpty());
        status2 = repo.workingCopy().parent2Status();
        Assert.assertTrue(status2.getRemoved().isEmpty());
    }
View Full Code Here

Examples of com.aragost.javahg.Repository.workingCopy()

        keepDeleteConflict.keep();
        Assert.assertTrue(a.exists());
        status1 = repo.workingCopy().status();
        Assert.assertTrue(status1.getRemoved().isEmpty());
        status2 = repo.workingCopy().parent2Status();
        Assert.assertTrue(status2.getRemoved().isEmpty());
    }

    @Test
    public void testMergeCtxFlagConflict() throws IOException, InterruptedException {
View Full Code Here

Examples of com.aragost.javahg.Repository.workingCopy()

        Changeset parent2 = commit();
        update(base);
        createSymlink(repo.file("b"), repo.file("a"));
        commit();

        ConflictResolvingContext mergeCtx = repo.workingCopy().merge(parent2);
        //Assert.assertEquals(1, mergeCtx.getFlagConflicts().size());
        //Assert.assertEquals("a", mergeCtx.getFlagConflicts().iterator().next().getFilename());
        Assert.assertEquals(1, mergeCtx.getMergeConflicts().size());
        Assert.assertEquals("a", mergeCtx.getMergeConflicts().iterator().next().getFilename());
    }
View Full Code Here

Examples of com.aragost.javahg.Repository.workingCopy()

        update(base);
        writeFile("a", "YY");
        writeFile("b", "a\na\na\nY\na\n");
        commit();

        ConflictResolvingContext mergeState = repo.workingCopy().merge(parent2);
        List<MergeConflict> mergeConflicts = mergeState.getMergeConflicts();
        Assert.assertEquals(2, mergeConflicts.size());
        MergeConflict mca = mergeConflicts.get(0);
        MergeConflict mcb = mergeConflicts.get(1);
        Assert.assertEquals("a", mca.getFilename());
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgDataFile.workingCopy()

  private void testReadWorkingCopy() throws Exception {
    for (String fname : cmdLineOpts.getList("")) {
      HgDataFile fn = hgRepo.getFileNode(fname);
      ByteArrayChannel sink = new ByteArrayChannel();
      fn.workingCopy(sink);
      System.out.printf("%s: read %d bytes of working copy", fname, sink.toArray().length);
    }
  }
 
  private void testParents() throws Exception {
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgDataFile.workingCopy()

    // modify working copy
    write(f1, c3);
    //
    HgDataFile df = repo.getFileNode(f1.getName());
    // 1. Shall take content of the file from the dir
    df.workingCopy(ch = new ByteArrayChannel());
    assertArrayEquals(c3.getBytes(), ch.toArray());
    // 2. Shall supply working copy even if no local file is there
    f1.delete();
    assertFalse(f1.exists());
    df = repo.getFileNode(f1.getName());
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgDataFile.workingCopy()

    assertArrayEquals(c3.getBytes(), ch.toArray());
    // 2. Shall supply working copy even if no local file is there
    f1.delete();
    assertFalse(f1.exists());
    df = repo.getFileNode(f1.getName());
    df.workingCopy(ch = new ByteArrayChannel());
    assertArrayEquals(c2.getBytes(), ch.toArray());
    //
    // 3. Shall extract revision of the file that corresponds actual parents (from dirstate) not the TIP as it was 
    exec.run("hg", "update", "-r", "0");
    assertEquals(0, exec.getExitValue());
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgDataFile.workingCopy()

    assertEquals(0, exec.getExitValue());
    f1.delete();
    assertFalse(f1.exists());
    // there's no file and workingCopy shall do some extra work to find out actual revision to check out
    df = repo.getFileNode(f1.getName());
    df.workingCopy(ch = new ByteArrayChannel());
    assertArrayEquals(c1.getBytes(), ch.toArray());
  }

  private static void write(File f, String content) throws IOException {
    FileWriter fw = new FileWriter(f);
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.