replikativ.crdt.cdvcs.stage

Upstream interaction for CDVCS with the stage.

checkout!

(checkout! stage [user cdvcs-id])
Tries to check out and waits until the CDVCS is available.
This possibly blocks forever if the CDVCS cannot be fetched from
some peer.

create-cdvcs!

(create-cdvcs! stage & {:keys [user is-public? id description], :or {is-public? false, description ""}})
Create a CDVCS given a description. Returns go block to synchronize.

fork!

(fork! stage [user cdvcs-id] & {:keys [into-user description is-public?], :or {is-public? false, description ""}})
Forks from one staged user's CDVCS into a new CDVCS for the stage
user. Returns go block to synchronize.

merge!

(merge! stage [user cdvcs-id] heads-order & {:keys [wait? correcting-transactions], :or {wait? true, correcting-transactions []}})
Merge multiple heads in a CDVCS. Use heads-order to decide in which
order commits contribute to the value. By adding older commits
before their parents, you can enforce to realize them (and their
past) first for this merge (commit-reordering). Only reorder parts
of the concurrent history, not of the sequential common
past. Returns go channel to synchronize.

merge-cost

(merge-cost graph)
Estimates cost for adding a further merge to the CDVCS by taking
the ratio between merges and normal commits of the commit-graph into account.

pull!

(pull! stage [remote-user cdvcs-id] & {:keys [into-user allow-induced-conflict? rebase-transactions?], :or {allow-induced-conflict? false, rebase-transactions? false}})
Pull from remote-user (can be the same) into CDVCS.
Defaults to stage user as into-user. Returns go-block to
synchronize.

transact!

(transact! stage [user cdvcs-id] txs)
Transact txs into CDVCS.  Returns go block to
synchronize. This change is not necessarily propagated atomicly.