Package org.locationtech.geogig.api.plumbing.diff

Examples of org.locationtech.geogig.api.plumbing.diff.DiffEntry.newPath()


                // Feature was deleted
                Optional<NodeRef> node = command(FindTreeChild.class).setChildPath(diff.newPath())
                        .setIndex(true).setParent(headTree).call();
                // make sure it is still deleted
                if (node.isPresent()) {
                    conflicts.add(new Conflict(diff.newPath(), diff.oldObjectId(), node.get()
                            .objectId(), diff.newObjectId()));
                } else {
                    index().stage(getProgressListener(), Iterators.singletonIterator(diff), 1);
                }
            } else {
View Full Code Here


                if (node.isPresent() && nodeId.equals(diff.oldObjectId())) {
                    index().stage(getProgressListener(), Iterators.singletonIterator(diff), 1);
                } else {
                    // do not mark as conflict if reverting to the same feature currently in HEAD
                    if (!nodeId.equals(diff.newObjectId())) {
                        conflicts.add(new Conflict(diff.newPath(), diff.oldObjectId(), node.get()
                                .objectId(), diff.newObjectId()));
                    }
                }

            }
View Full Code Here

                while (unstaged.hasNext()) {
                    DiffEntry entry = unstaged.next();
                    ChangeType type = entry.changeType();
                    switch (type) {
                    case ADDED:
                        cli.getConsole().println("A\t" + entry.newPath());
                        break;
                    case MODIFIED:
                        cli.getConsole().println("M\t" + entry.newPath());
                        break;
                    case REMOVED:
View Full Code Here

                    switch (type) {
                    case ADDED:
                        cli.getConsole().println("A\t" + entry.newPath());
                        break;
                    case MODIFIED:
                        cli.getConsole().println("M\t" + entry.newPath());
                        break;
                    case REMOVED:
                        cli.getConsole().println("D\t" + entry.oldPath());
                        break;
                    }
View Full Code Here

                        .setOldVersion(commit.parentN(0).get()).setNewVersion(commit.getId())
                        .call();
                DiffEntry diffEntry;
                while (diff.hasNext()) {
                    diffEntry = diff.next();
                    ansi.a("\t" + diffEntry.newPath()).newline();
                }
            }
            if (detail.equals(LOG_DETAIL.STATS) && commit.getParentIds().size() == 1) {

                Iterator<DiffEntry> diff = geogig.command(DiffOp.class)
View Full Code Here

                        .setNewVersion(commit.getId().toString()).setFilter(path).call();
                while (diff.hasNext()) {
                    DiffEntry entry = diff.next();
                    response += entry.changeType().toString() + ",";
                    String fid = "";
                    if (entry.newPath() != null) {
                        if (entry.oldPath() != null) {
                            fid = entry.oldPath() + " -> " + entry.newPath();
                        } else {
                            fid = entry.newPath();
                        }
View Full Code Here

                    DiffEntry entry = diff.next();
                    response += entry.changeType().toString() + ",";
                    String fid = "";
                    if (entry.newPath() != null) {
                        if (entry.oldPath() != null) {
                            fid = entry.oldPath() + " -> " + entry.newPath();
                        } else {
                            fid = entry.newPath();
                        }
                    } else if (entry.oldPath() != null) {
                        fid = entry.oldPath();
View Full Code Here

                    String fid = "";
                    if (entry.newPath() != null) {
                        if (entry.oldPath() != null) {
                            fid = entry.oldPath() + " -> " + entry.newPath();
                        } else {
                            fid = entry.newPath();
                        }
                    } else if (entry.oldPath() != null) {
                        fid = entry.oldPath();
                    }
                    response += fid + ",";
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.