Examples of oldPath()


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

        final String path = NodeRef.appendChild(pointsName, points1.getIdentifier().getID());

        assertNotNull(difflist);
        assertEquals(1, difflist.size());
        DiffEntry de = difflist.get(0);
        assertEquals(path, de.oldPath());

        assertEquals(DiffEntry.ChangeType.REMOVED, de.changeType());

        assertEquals(featureContentId, de.oldObjectId());
View Full Code Here

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

        // then the diff should report an ADD instead of a DELETE
        assertNotNull(difflist);
        assertEquals(1, difflist.size());
        DiffEntry de = difflist.get(0);
        assertNull(de.oldPath());
        assertEquals(path, de.newPath());

        assertEquals(DiffEntry.ChangeType.ADDED, de.changeType());

        assertEquals(ObjectId.NULL, de.oldObjectId());
View Full Code Here

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

                    }

                    FeatureBuilder featureBuilder = new FeatureBuilder(featureType);
                    Feature feature = featureBuilder.build(diffEntry.oldObjectId().toString(),
                            (RevFeature) revObject);
                    String name = diffEntry.oldPath();
                    patch.addRemovedFeature(name, feature, featureType);
                } else if (revObject instanceof RevTree) {
                    ObjectId metadataId = diffEntry.getOldObject().getMetadataId();
                    if (!metadataId.isNull()) {
                        RevFeatureType featureType = command(RevObjectParse.class)
View Full Code Here

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

        Map<String, ObjectId> parentMetadataIds = Maps.newHashMap();
        Set<String> removedTrees = Sets.newHashSet();
        StagingDatabase database = getDatabase();
        while (unstaged.hasNext()) {
            final DiffEntry diff = unstaged.next();
            final String fullPath = diff.oldPath() == null ? diff.newPath() : diff.oldPath();
            final String parentPath = NodeRef.parentPath(fullPath);
            /*
             * TODO: revisit, ideally the list of diff entries would come with one single entry for
             * the whole removed tree instead of that one and every single children of it.
             */
 
View Full Code Here

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

        Map<String, ObjectId> parentMetadataIds = Maps.newHashMap();
        Set<String> removedTrees = Sets.newHashSet();
        StagingDatabase database = getDatabase();
        while (unstaged.hasNext()) {
            final DiffEntry diff = unstaged.next();
            final String fullPath = diff.oldPath() == null ? diff.newPath() : diff.oldPath();
            final String parentPath = NodeRef.parentPath(fullPath);
            /*
             * TODO: revisit, ideally the list of diff entries would come with one single entry for
             * the whole removed tree instead of that one and every single children of it.
             */
 
View Full Code Here

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

                        .setNewVersion(commit.getId()).call();
                DiffEntry diffEntry;
                sb.append("changes\n");
                while (diff.hasNext()) {
                    diffEntry = diff.next();
                    String path = diffEntry.newPath() != null ? diffEntry.newPath() : diffEntry
                            .oldPath();
                    sb.append('\t').append(path).append(' ')
                            .append(diffEntry.oldObjectId().toString()).append(' ')
                            .append(diffEntry.newObjectId().toString()).append('\n');
                }
View Full Code Here

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

        DiffEntry diffEntry;
        HashMap<String, Long[]> stats = Maps.newHashMap();
        while (diffEntries.hasNext()) {
            diffEntry = diffEntries.next();
            StringBuilder sb = new StringBuilder();
            String path = diffEntry.newPath() != null ? diffEntry.newPath() : diffEntry.oldPath();

            if (describe) {
                sb.append(diffEntry.changeType().toString().charAt(0)).append(' ').append(path)
                        .append(LINE_BREAK);
View Full Code Here

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

        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.oldPath()

        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.oldPath()

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