package ezirmin
An easy interface on top of the Irmin library.
Install
Dune Dependency
Authors
Maintainers
Sources
ezirmin-0.2.0.tbz
sha256=1de8ed09b855f632d7591e8e4e31cc5247bd48dbd299949988895fb3030f479d
md5=05107c52d136602611024c71f03c343d
Description
Ezirmin is an easy interface on top of the Irmin library. It comes with set of mergeable datatypes, instantiated to specific backends to quickly get going. For example,
$ utop
utop # #require "ezirmin";;
utop # module M = Ezirmin.FS_queue(Tc.String);; (* Mergeable queue of strings *)
utop # open M;;
utop # open Lwt.Infix;;
utop # let m = Lwt_main.run (init ~root:"/tmp/ezirminq" ~bare:true () >>= master);;
val m : branch = <abstr>
utop # push m ["home"; "todo"] "buy milk";;
- : unit = ()
utop # push m ["work"; "todo"] "publish ezirmin";;
- : unit = ()
This mergeable queue is saved in the git repository at /tmp/ezirminq
. In
another terminal,
$ utop
utop # #require "ezirmin";;
utop # module M = Ezirmin.FS_queue(Tc.String);; (* Mergeable queue of strings *)
utop # open M;;
utop # open Lwt.Infix;;
utop # let m = Lwt_main.run (init ~root:"/tmp/ezirminq" ~bare:true () >>= master);;
val m : branch = <abstr>
utop # pop m ["home"; "todo"];;
- : string option = Some "buy milk"
For concurrency control, use branches. In the first terminal,
utop # let wip_t1 = Lwt_main.run @@ clone_force m "wip_t1";;
utop # push wip_t1 ["home"; "todo"] "walk dog";;
- : unit = ()
utop # push wip_t1 ["home"; "todo"] "take out trash";;
- : unit = ()
The changes are not visible until the branches are merged.
utop # to_list m ["home"; "todo"];;
- : string list = []
utop # merge wip_t1 ~into:m;;
- : unit = ()
utop # to_list m ["home"; "todo"];;
- : string list = ["walk dog"; "take out trash"]
Published: 09 Feb 2017
Dependencies (10)
- ppx_jane
- ptime
- irmin-watcher
-
irmin
= "0.12.0"
-
git-unix
< "1.10.0"
- lwt
-
topkg
build
-
ocamlbuild
build
-
ocamlfind
build
-
ocaml
>= "4.01.0"
Dev Dependencies
None
Used by
None
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page