Compare commits
No commits in common. "921ee6b68468994da81b915ae09461c8ab983877" and "ccc8e562b16a337b2b61b184a5ff1982a4789ee9" have entirely different histories.
921ee6b684
...
ccc8e562b1
2 changed files with 3 additions and 6 deletions
|
@ -8,7 +8,7 @@ let mirror =
|
||||||
package "h2" ;
|
package "h2" ;
|
||||||
package "ohex" ;
|
package "ohex" ;
|
||||||
package "httpaf" ;
|
package "httpaf" ;
|
||||||
package ~min:"0.0.5" "git-kv" ;
|
package ~max:"0.0.5" "git-kv" ;
|
||||||
package ~min:"3.10.0" "git-paf" ;
|
package ~min:"3.10.0" "git-paf" ;
|
||||||
package "opam-file-format" ;
|
package "opam-file-format" ;
|
||||||
package ~min:"3.0.0" ~sublibs:[ "gz" ] "tar" ;
|
package ~min:"3.0.0" ~sublibs:[ "gz" ] "tar" ;
|
||||||
|
|
|
@ -902,9 +902,7 @@ stamp: %S
|
||||||
Logs.info (fun m -> m "downloading of %d urls done" (SM.cardinal urls))
|
Logs.info (fun m -> m "downloading of %d urls done" (SM.cardinal urls))
|
||||||
|
|
||||||
let dump_git git_dump git_kv =
|
let dump_git git_dump git_kv =
|
||||||
let stream = Git_kv.to_octets git_kv in
|
Git_kv.to_octets git_kv >>= fun data ->
|
||||||
Lwt_stream.to_list stream >>= fun datas ->
|
|
||||||
let data = String.concat "" datas in
|
|
||||||
Cache.write git_dump data >|= function
|
Cache.write git_dump data >|= function
|
||||||
| Ok () ->
|
| Ok () ->
|
||||||
Logs.info (fun m -> m "dumped git %d bytes" (String.length data))
|
Logs.info (fun m -> m "dumped git %d bytes" (String.length data))
|
||||||
|
@ -918,8 +916,7 @@ stamp: %S
|
||||||
Logs.warn (fun m -> m "failed to read git state: %a" Cache.pp_error e);
|
Logs.warn (fun m -> m "failed to read git state: %a" Cache.pp_error e);
|
||||||
Lwt.return (Error ())
|
Lwt.return (Error ())
|
||||||
| Ok Some data ->
|
| Ok Some data ->
|
||||||
let stream = Lwt_stream.return data in
|
Git_kv.of_octets git_ctx ~remote data >|= function
|
||||||
Git_kv.of_octets git_ctx ~remote stream >|= function
|
|
||||||
| Ok git_kv -> Ok git_kv
|
| Ok git_kv -> Ok git_kv
|
||||||
| Error `Msg msg ->
|
| Error `Msg msg ->
|
||||||
Logs.err (fun m -> m "error restoring git state: %s" msg);
|
Logs.err (fun m -> m "error restoring git state: %s" msg);
|
||||||
|
|
Loading…
Reference in a new issue