Package org.locationtech.geogig.api.porcelain

Examples of org.locationtech.geogig.api.porcelain.MergeOp.call()


        Ref branch2 = geogig.command(RefParse.class).setName("branch2").call().get();
        MergeOp mergeOp = geogig.command(MergeOp.class);
        mergeOp.addCommit(Suppliers.ofInstance(branch1.getObjectId()));
        mergeOp.addCommit(Suppliers.ofInstance(branch2.getObjectId()));
        try {
            mergeOp.call();
            fail();
        } catch (IllegalStateException e) {
            assertTrue(e.getMessage().contains(
                    "Cannot merge more than two commits when conflicts exist"));
        }
View Full Code Here


                .addCommit(Suppliers.ofInstance(branch3.getId()))
                .addCommit(Suppliers.ofInstance(branch4.getId()))
                .addCommit(Suppliers.ofInstance(branch5.getId()))
                .addCommit(Suppliers.ofInstance(branch6.getId()));
        try {
            mergeOp.call();
            fail();
        } catch (IllegalStateException e) {
            assertTrue(e.getMessage().contains(
                    "Cannot merge more than two commits when conflicts exist"));
        }
View Full Code Here

                Optional<ObjectId> commitId;
                commitId = geogig.command(RevParse.class).setRefSpec(commitish).call();
                checkParameter(commitId.isPresent(), "Commit not found '%s'", commitish);
                merge.addCommit(Suppliers.ofInstance(commitId.get()));
            }
            MergeReport report = merge.call();
            commit = report.getMergeCommit();
        } catch (RuntimeException e) {
            if (e instanceof NothingToCommitException || e instanceof IllegalArgumentException
                    || e instanceof IllegalStateException) {
                throw new CommandFailedException(e.getMessage(), e);
View Full Code Here

        merge.setAuthor(authorName.orNull(), authorEmail.orNull());
        merge.addCommit(Suppliers.ofInstance(mapped.getId()));
        merge.setMessage(mergeMessage.or("Merged revert of " + featurePath));

        try {
            final MergeReport report = merge.call();

            context.setResponseContent(new CommandResponse() {
                @Override
                public void write(ResponseWriter out) throws Exception {
                    out.start();
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.