Package org.locationtech.geogig.api.porcelain

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


        // Make sure the local master matches the remote
        localGeogig.geogig.command(BranchCreateOp.class).setName("mynewbranch")
                .setAutoCheckout(true).call();

        // Pull the commit
        PullOp pull = pull();
        pull.addRefSpec("master");
        pull.setRebase(true).call();

        final Optional<Ref> currHead = localGeogig.geogig.command(RefParse.class).setName(Ref.HEAD)
                .call();
        assertTrue(currHead.isPresent());
        assertTrue(currHead.get() instanceof SymRef);
View Full Code Here


                throw new CommandFailedException(
                        "Depth operations can only be used on a shallow clone.");
            }
        }

        PullOp pull = geogig.command(PullOp.class);
        pull.setProgressListener(cli.getProgressListener());
        pull.setAll(all).setRebase(rebase).setFullDepth(fulldepth);
        pull.setDepth(depth);

        if (args != null) {
            if (args.size() > 0) {
                pull.setRemote(args.get(0));
            }
            for (int i = 1; i < args.size(); i++) {
                pull.addRefSpec(args.get(i));
            }
        }

        try {
            final PullResult result = pull.call();

            ConsoleReader console = cli.getConsole();
            TransferSummary fetchResult = result.getFetchResult();
            FetchResultPrinter.print(fetchResult, console);
View Full Code Here

     */
    @Override
    public void run(CommandContext context) {
        final Context geogig = this.getCommandLocator(context);

        PullOp command = geogig.command(PullOp.class)
                .setAuthor(authorName.orNull(), authorEmail.orNull()).setRemote(remoteName)
                .setAll(fetchAll).addRefSpec(refSpec);
        try {
            final PullResult result = command.call();
            final Iterator<DiffEntry> iter;
            if (result.getOldRef() != null && result.getNewRef() != null
                    && result.getOldRef().equals(result.getNewRef())) {
                iter = null;
            } else {
View Full Code Here

TOP

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

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.