Examples of StoredCommit


Examples of org.apache.jackrabbit.mk.model.StoredCommit

            return "";
        }

        try {
            if ("/".equals(path)) {
                StoredCommit toCommit = rep.getCommit(toRevisionId);
                if (toCommit.getParentId().equals(fromRevisionId)) {
                    // specified range spans a single commit:
                    // use diff stored in commit instead of building it dynamically
                    return toCommit.getChanges();
                }
            }
            NodeState before = rep.getNodeState(fromRevisionId, path);
            NodeState after = rep.getNodeState(toRevisionId, path);
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.StoredCommit

    }

    public StoredCommit getCommit(Id id) throws NotFoundException, Exception {
        verifyInitialized();

        StoredCommit commit = (StoredCommit) cache.get(id);
        if (commit != null) {
            return commit;
        }

        commit = pm.readCommit(id);
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.StoredCommit

        pm.writeCommit(id, commit);

        if (callback != null) {
            callback.postPersist(this, token);
        }
        cache.put(id, new StoredCommit(id, commit));
        return id;
    }
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.StoredCommit

            if (firstBranchRootId != null && firstBranchRootId.compareTo(firstCommitId) < 0) {
                firstCommitId = firstBranchRootId;
            }
            /* repair dangling parent commit of first preserved commit */
            StoredCommit commit = getCommit(firstCommitId);
            if (commit.getParentId() != null) {
                MutableCommit firstCommit = new MutableCommit(commit);
                firstCommit.setParentId(null);
                gcpm.replaceCommit(firstCommit.getId(), firstCommit);
            }
           
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.StoredCommit

    public void setup() throws Exception {
        rs = new DefaultRevisionStore(createPersistence()) {
            @Override
            protected Id markCommits() throws Exception {
                // Keep head commit only
                StoredCommit commit = getHeadCommit();
                markCommit(commit);
                return commit.getId();
            }
        };
        rs.initialize();

        mk = new MicroKernelImpl(new Repository(rs, new MemoryBlobStore()));
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.StoredCommit

    public void setup() throws Exception {
        rs = new DefaultRevisionStore(createPersistence()) {
            @Override
            protected Id markCommits() throws Exception {
                // Keep head commit only
                StoredCommit commit = getHeadCommit();
                markCommit(commit);
                return commit.getId();
            }
        };
        rs.initialize();

        mk = new MicroKernelImpl(new Repository(rs, new MemoryBlobStore()));
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.StoredCommit

    }

    public StoredCommit getCommit(Id id) throws NotFoundException, Exception {
        verifyInitialized();

        StoredCommit commit = (StoredCommit) cache.get(id);
        if (commit != null) {
            return commit;
        }

        commit = pm.readCommit(id);
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.StoredCommit

        pm.writeCommit(id, commit);

        if (callback != null) {
            callback.postPersist(this, token);
        }
        cache.put(id, new StoredCommit(id, commit));
        return id;
    }
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.StoredCommit

            if (firstBranchRootId != null && firstBranchRootId.compareTo(firstCommitId) < 0) {
                firstCommitId = firstBranchRootId;
            }
            /* repair dangling parent commit of first preserved commit */
            StoredCommit commit = getCommit(firstCommitId);
            if (commit.getParentId() != null) {
                MutableCommit firstCommit = new MutableCommit(commit);
                firstCommit.setParentId(null);
                gcpm.replaceCommit(firstCommit.getId(), firstCommit);
            }
           
View Full Code Here

Examples of org.apache.jackrabbit.mk.model.StoredCommit

        /* Mark all branch commits */
        for (Entry<Id, Id> entry : tmpBranches.entrySet()) {
            Id branchRootId = entry.getKey();
            Id branchHeadId = entry.getValue();
            while (!branchHeadId.equals(branchRootId)) {
                StoredCommit commit = getCommit(branchHeadId);
                markCommit(commit);
                branchHeadId = commit.getParentId();
            }
        }
        /* Mark all master commits till the first branch root id */
        if (!tmpBranches.isEmpty()) {
            Id firstBranchRootId = tmpBranches.keySet().iterator().next();
            StoredCommit commit = getHeadCommit();

            for (;;) {
                markCommit(commit);
                if (commit.getId().equals(firstBranchRootId)) {
                    break;
                }
                commit = getCommit(commit.getParentId());
            }
            return firstBranchRootId;
        }
        return null;
    }
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.