Package org.locationtech.geogig.repository

Examples of org.locationtech.geogig.repository.Repository.index()


                    conflicts = applyRevertedChanges(commit);
                }
                if (createCommit && conflicts.isEmpty()) {
                    createCommit(commit);
                } else {
                    workingTree().updateWorkHead(repository.index().getTree().getId());
                    if (!conflicts.isEmpty()) {
                        // mark conflicted elements
                        command(ConflictsWriteOp.class).setConflicts(conflicts).call();

                        // created exception message
View Full Code Here


        RevCommit oldCommit = repository.getCommit(commit.get());

        if (patterns.size() > 0) {
            for (String pattern : patterns) {
                DiffTree diffOp = command(DiffTree.class)
                        .setOldTree(repository.index().getTree().getId())
                        .setNewTree(oldCommit.getTreeId()).setPathFilter(pattern);

                Iterator<DiffEntry> diff = diffOp.call();

                final long numChanges = Iterators.size(diffOp.call());
View Full Code Here

                    // We are reseting to the current version, so there is nothing to do. However,
                    // if we are in a conflict state, the conflict should be removed and calling
                    // stage() will not do it, so we do it here
                    repository.stagingDatabase().removeConflict(null, pattern);
                } else {
                    repository.index().stage(subProgress((1.f / patterns.size()) * 100.f), diff,
                            numChanges);
                }
            }
        } else {
            if (mode == ResetMode.NONE) {
View Full Code Here

            // write new tree
            ObjectId newTreeId = command(WriteTree2.class).call();
            RevCommit newCommit = command(CommitOp.class).setCommit(commitToApply).call();

            repository.workingTree().updateWorkHead(newTreeId);
            repository.index().updateStageHead(newTreeId);

            getProgressListener().complete();

            return newCommit;
        } else {
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.