Marshal.to_channel ch (magic,(!global_aliases,!rev_includes_map)) [];
close_out ch in
let load_db () =
+ HExtlib.mkdir (Helm_registry.get "matita.basedir");
try
let ga,im = require_path (db_path ()) in
let ga =
let time_travel status =
let sto,ali,cac,inc = status#timestamp in
- storage := sto; local_aliases := ali; cache := cac; includes := inc
+ let diff_len = List.length !storage - List.length sto in
+ let to_be_deleted,_ = HExtlib.split_nth diff_len !storage in
+ if List.length to_be_deleted > 0 then
+ let u,_ = HExtlib.list_last to_be_deleted in
+ NCicEnvironment.invalidate_obj u;
+ storage := sto; local_aliases := ali; cache := cac; includes := inc
;;
let serialize ~baseuri dump =
Not_found -> raise (NCicEnvironment.ObjectNotFound (lazy (NUri.string_of_uri uri)))
;;
-let add_obj status u obj =
+let add_obj status ((u,_,_,_,_) as obj) =
+ NCicEnvironment.check_and_add_obj obj;
storage := (u,obj)::!storage;
let _,height,_,_,obj = obj in
let references =