Examples of newPath()


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

        Iterator<DiffEntry> diffs = command(DiffTree.class).setOldTree(parentTreeId)
                .setNewTree(commit.getTreeId()).setReportTrees(true).call();

        while (diffs.hasNext()) {
            DiffEntry diff = diffs.next();
            String path = diff.oldPath() == null ? diff.newPath() : diff.oldPath();
            Optional<RevObject> obj = command(RevObjectParse.class).setRefSpec(
                    Ref.HEAD + ":" + path).call();
            switch (diff.changeType()) {
            case ADDED:
                if (obj.isPresent()) {
View Full Code Here

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

        Iterator<DiffEntry> diffs = command(DiffTree.class).setOldTree(ancestor.get())
                .setReportTrees(true).setNewTree(mergeInto.getId()).call();
        while (diffs.hasNext()) {
            DiffEntry diff = diffs.next();
            String path = diff.oldPath() == null ? diff.newPath() : diff.oldPath();
            mergeIntoDiffs.put(path, diff);
        }

        Iterator<DiffEntry> toMergeDiffs = command(DiffTree.class).setOldTree(ancestor.get())
                .setReportTrees(true).setNewTree(toMerge.getId()).call();
View Full Code Here

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

        Iterator<DiffEntry> toMergeDiffs = command(DiffTree.class).setOldTree(ancestor.get())
                .setReportTrees(true).setNewTree(toMerge.getId()).call();
        while (toMergeDiffs.hasNext()) {
            DiffEntry toMergeDiff = toMergeDiffs.next();
            String path = toMergeDiff.oldPath() == null ? toMergeDiff.newPath() : toMergeDiff
                    .oldPath();
            if (mergeIntoDiffs.containsKey(path)) {
                RevCommit ancestorCommit = command(RevObjectParse.class)
                        .setRefSpec(ancestor.get().toString()).call(RevCommit.class).get();
                RevTree ancestorTree = command(RevObjectParse.class)
View Full Code Here

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

        for (RevCommit commit : commits) {
            Iterator<DiffEntry> toMergeDiffs = command(DiffTree.class).setReportTrees(true)
                    .setOldTree(ancestor.get()).setNewTree(commit.getId()).call();
            while (toMergeDiffs.hasNext()) {
                DiffEntry diff = toMergeDiffs.next();
                String path = diff.oldPath() == null ? diff.newPath() : diff.oldPath();
                if (diffs.containsKey(path)) {
                    diffs.get(path).add(diff);
                } else {
                    diffs.put(path, Lists.newArrayList(diff));
                }
View Full Code Here

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

        DiffEntry diff;
        while (reverseDiff.hasNext()) {
            diff = reverseDiff.next();
            if (diff.isAdd()) {
                // 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()));
View Full Code Here

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

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

                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

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

                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

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

                    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

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

                        .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
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.