Package org.locationtech.geogig.storage

Examples of org.locationtech.geogig.storage.GraphDatabase.map()


            RevTree rootTree = RevTree.EMPTY;

            if (commit.getParentIds().size() > 0) {
                // Map this commit to the last "sparse" commit in my ancestry
                ObjectId mappedCommit = graphDatabase.getMapping(commit.getParentIds().get(0));
                graphDatabase.map(commit.getId(), mappedCommit);
                Optional<ObjectId> treeId = localRepository.command(ResolveTreeish.class)
                        .setTreeish(mappedCommit).call();
                if (treeId.isPresent()) {
                    rootTree = localRepository.getTree(treeId.get());
                }
View Full Code Here


                if (treeId.isPresent()) {
                    rootTree = localRepository.getTree(treeId.get());
                }

            } else {
                graphDatabase.map(commit.getId(), ObjectId.NULL);
            }

            Iterator<DiffEntry> it = Iterators.filter(changes, new Predicate<DiffEntry>() {
                @Override
                public boolean apply(DiffEntry e) {
View Full Code Here

                if (changes.wasFiltered()) {
                    graphDatabase.setProperty(mapped.getId(), GraphDatabase.SPARSE_FLAG, "true");
                }

                graphDatabase.map(mapped.getId(), commit.getId());
                // Replace the old mapping with the new commit Id.
                graphDatabase.map(commit.getId(), mapped.getId());
            } else if (allowEmpty) {
                CommitBuilder builder = new CommitBuilder(commit);
                List<ObjectId> newParents = new LinkedList<ObjectId>();
View Full Code Here

                    graphDatabase.setProperty(mapped.getId(), GraphDatabase.SPARSE_FLAG, "true");
                }

                graphDatabase.map(mapped.getId(), commit.getId());
                // Replace the old mapping with the new commit Id.
                graphDatabase.map(commit.getId(), mapped.getId());
            } else if (allowEmpty) {
                CommitBuilder builder = new CommitBuilder(commit);
                List<ObjectId> newParents = new LinkedList<ObjectId>();
                for (ObjectId parentCommitId : commit.getParentIds()) {
                    newParents.add(graphDatabase.getMapping(parentCommitId));
View Full Code Here

                RevCommit mapped = builder.build();
                objectDatabase.put(mapped);

                graphDatabase.setProperty(mapped.getId(), GraphDatabase.SPARSE_FLAG, "true");

                graphDatabase.map(mapped.getId(), commit.getId());
                // Replace the old mapping with the new commit Id.
                graphDatabase.map(commit.getId(), mapped.getId());
            } else {
                // Mark the mapped commit as sparse, since it wont have these changes
                graphDatabase.setProperty(graphDatabase.getMapping(commit.getId()),
View Full Code Here

                graphDatabase.setProperty(mapped.getId(), GraphDatabase.SPARSE_FLAG, "true");

                graphDatabase.map(mapped.getId(), commit.getId());
                // Replace the old mapping with the new commit Id.
                graphDatabase.map(commit.getId(), mapped.getId());
            } else {
                // Mark the mapped commit as sparse, since it wont have these changes
                graphDatabase.setProperty(graphDatabase.getMapping(commit.getId()),
                        GraphDatabase.SPARSE_FLAG, "true");
            }
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.