Examples of BaseRepository


Examples of com.aragost.javahg.BaseRepository

    }

    @Test
    public void testGraftSelf() throws IOException {
        Assume.assumeTrue(isGraftSupported());
        BaseRepository repo = getTestRepository();
        Changeset cs = createChangeset();
        GraftCommand.on(repo).execute(cs);
        List<Changeset> heads = repo.heads();
        assertSingleton(cs, heads);
    }
View Full Code Here

Examples of com.aragost.javahg.BaseRepository

    }

    @Test
    public void test() throws IOException {
        Assume.assumeTrue(isGraftSupported());
        BaseRepository repo = getTestRepository();
        Changeset base = createChangeset();
        writeFile("a");
        Changeset cs = commit();
        update(base);
        writeFile("b");
        commit();
        ConflictResolvingContext r = GraftCommand.on(repo).execute(cs);
        Assert.assertNull(r);
        Changeset tip = repo.tip();
        String source = tip.getExtra().getString("source");
        Assert.assertEquals(cs.getNode(), source);
    }
View Full Code Here

Examples of com.aragost.javahg.BaseRepository

    }

    @Test
    public void testKeepDeleteConflict() throws IOException {
        Assume.assumeTrue(isGraftSupported());
        BaseRepository repo = getTestRepository();
        writeFile("file", "");
        Changeset base = commit();
        writeFile("file", "X");
        Changeset changed = commit();
        update(base);
        RemoveCommand.on(repo).execute("file");
        Changeset removed = commit();

        GraftContext ctx = GraftCommand.on(repo).execute(changed);
        Assert.assertNotNull(ctx);
        Assert.assertTrue(ctx.getFlagConflicts().isEmpty());
        Assert.assertTrue(ctx.getMergeConflicts().isEmpty());
        KeepDeleteConflict kdc = Utils.single(ctx.getKeepDeleteConflicts());
        Assert.assertNotNull(kdc);
        Assert.assertSame(removed, repo.tip());
        Assert.assertEquals("file", kdc.getFilename());
        Assert.assertSame(changed, ctx.getSource());
        kdc.delete();
        // TODO commiting results in an error, see issue 3261
        // Changeset cs = ctx.commit();
View Full Code Here

Examples of com.aragost.javahg.BaseRepository

    }

    @Test
    public void testMergeConflict() throws IOException {
        Assume.assumeTrue(isGraftSupported());
        BaseRepository repo = getTestRepository();
        writeFile("file", "");
        Changeset base = commit();
        writeFile("file", "X");
        Changeset changed1 = commit();
        update(base);
View Full Code Here

Examples of org.apache.karaf.features.internal.repository.BaseRepository

        this.digraph = digraph;
        this.globalRepository = globalRepository != null ? new SubsystemRepository(globalRepository) : null;
        this.downloader = downloader;

        prepare(root);
        repository = new BaseRepository(resToSub.keySet());

        // Add a heuristic to sort capabilities :
        //  if a capability comes from a resource which needs to be installed,
        //  prefer that one over any capabilities from other resources
        findMandatory(root);
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.