Package org.locationtech.geogig.api.porcelain

Examples of org.locationtech.geogig.api.porcelain.RevertOp


    protected void runInternal(GeogigCLI cli) throws IOException {
        checkParameter(commits.size() > 0 || abort || continueRevert,
                "nothing specified for reverting");

        final GeoGIG geogig = cli.getGeogig();
        RevertOp revert = geogig.command(RevertOp.class);

        for (String st : commits) {
            Optional<ObjectId> commitId = geogig.command(RevParse.class).setRefSpec(st).call();
            checkParameter(commitId.isPresent(), "Couldn't resolve '" + st
                    + "' to a commit, aborting revert.");
            revert.addCommit(Suppliers.ofInstance(commitId.get()));
        }
        try {
            revert.setCreateCommit(!noCommit).setAbort(abort).setContinue(continueRevert).call();
        } catch (RevertConflictsException e) {
            StringBuilder sb = new StringBuilder();
            sb.append(e.getMessage() + "\n");
            sb.append("When you have fixed these conflicts, run 'geogig revert --continue' to continue the revert operation.\n");
            sb.append("To abort the revert operation, run 'geogig revert --abort'\n");
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.api.porcelain.RevertOp

Copyright © 2018 www.massapicom. 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.