Package com.aragost.javahg

Examples of com.aragost.javahg.Changeset.phase()


        Assume.assumeTrue(isPhasesSupported());
        BaseRepository repo = getTestRepository();
        Changeset cs1 = createChangeset();
        Changeset cs2 = createChangeset();
        Assert.assertEquals(DRAFT, cs1.phase());
        Assert.assertEquals(DRAFT, cs2.phase());
        PhaseCommand cmd = PhaseCommand.on(repo).pub().rev(cs2.getNode());
        cmd.execute();
        Assert.assertEquals(PUBLIC, cs1.phase());
        Assert.assertEquals(PUBLIC, cs2.phase());
View Full Code Here


        Assert.assertEquals(DRAFT, cs1.phase());
        Assert.assertEquals(DRAFT, cs2.phase());
        PhaseCommand cmd = PhaseCommand.on(repo).pub().rev(cs2.getNode());
        cmd.execute();
        Assert.assertEquals(PUBLIC, cs1.phase());
        Assert.assertEquals(PUBLIC, cs2.phase());

        cmd = PhaseCommand.on(repo).secret().rev(cs2.getNode());
        Assert.assertFalse(cmd.execute());
        Assert.assertEquals(PUBLIC, cs1.phase());
        Assert.assertEquals(PUBLIC, cs2.phase());
View Full Code Here

        Assert.assertEquals(PUBLIC, cs2.phase());

        cmd = PhaseCommand.on(repo).secret().rev(cs2.getNode());
        Assert.assertFalse(cmd.execute());
        Assert.assertEquals(PUBLIC, cs1.phase());
        Assert.assertEquals(PUBLIC, cs2.phase());

        cmd = PhaseCommand.on(repo).secret().force().rev(cs1.getNode());
        Assert.assertTrue(cmd.execute());
        Assert.assertEquals(SECRET, cs1.phase());
        Assert.assertEquals(SECRET, cs2.phase());
View Full Code Here

        Assert.assertEquals(PUBLIC, cs2.phase());

        cmd = PhaseCommand.on(repo).secret().force().rev(cs1.getNode());
        Assert.assertTrue(cmd.execute());
        Assert.assertEquals(SECRET, cs1.phase());
        Assert.assertEquals(SECRET, cs2.phase());
       
        cmd = PhaseCommand.on(repo).pub().force().rev(cs1.getNode());
        cmd.execute();
        Assert.assertEquals(PUBLIC, cs1.phase());
        Assert.assertEquals(SECRET, cs2.phase());
View Full Code Here

        Assert.assertEquals(SECRET, cs2.phase());
       
        cmd = PhaseCommand.on(repo).pub().force().rev(cs1.getNode());
        cmd.execute();
        Assert.assertEquals(PUBLIC, cs1.phase());
        Assert.assertEquals(SECRET, cs2.phase());
    }

    @Test
    public void testPhaseMakesNoChanges() throws IOException {
        Assume.assumeTrue(isPhasesSupported());
View Full Code Here

   
    @Test
    public void testPhasesWhenPhasesNotSupported() throws IOException {
        Assume.assumeTrue(!isPhasesSupported());
        Changeset cs = createChangeset();
        Assert.assertNull(cs.phase());       
    }

    @Test
    public void testPhasesUnknownRev() throws IOException {
        Assume.assumeTrue(isPhasesSupported());
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.