package irmin
SYNC
provides functions to synchronization an Irmin store with local and remote Irmin stores.
Native Synchronization
fetch t ?depth r
populate the local store t
with objects for the remote store r
, using t
's current branch. The depth
parameter limits the history depth. Return None
if either the local or remote store do not have a valid head.
Same as fetch
but raise Invalid_argument
if either the local or remote store do not have a valid head.
val pull :
db ->
?depth:int ->
remote ->
[ `Merge | `Update ] ->
[ `Ok | `No_head | `Error ] Merge.result Lwt.t
pull t ?depth r s
is similar to fetch but it also updates t
's current branch. s
is the update strategy:
`Merge
usesS.merge_head
. This strategy can return a conflict.`Update
usesS.update_head.
Same as pull
but raise Merge.Conflict
in case of conflict.
push t ?depth r
populates the remote store r
with objects from the current store t
, using t
's current branch. If b
is t
's current branch, push
also updates the head of b
in r
to be the same as in t
.
Note: Git semantics is to update b
only if the new head if more recent. This is not the case in Irmin.