- (*
- (* this is debug code
- * idea: debug_list is the list of objects to be removed as computed from the
- * db, while list_of_objs_to_remove is the same list but computer from the
- * differences between statuses *)
- let l1 = List.sort Pervasives.compare !debug_list in
- let l2 = List.sort Pervasives.compare
- (List.map (fun (x,_) -> UriManager.string_of_uri x) list_of_objs_to_remove)
- in
- let rec uniq = function
- | [] -> []
- | h::[] -> [h]
- | h1::h2::tl when h1 = h2 -> uniq (h2 :: tl)
- | h1::tl (* when h1 <> h2 *) -> h1 :: uniq tl
- in
- let l1 = uniq l1 in
- let l2 = uniq l2 in
- try
- List.iter2 (fun x y -> if x <> y then raise Exit) l1 l2
- with
- | Invalid_argument _ | Exit ->
- HLog.debug "It seems you garbaged something...";
- HLog.debug "l1:";
- List.iter HLog.debug l1;
- HLog.debug "l2:";
- List.iter HLog.debug l2
- *)