]> matita.cs.unibo.it Git - helm.git/commitdiff
now tables are recreated if needed and mattiaclean all really clears the owner env...
authorEnrico Tassi <enrico.tassi@inria.fr>
Thu, 7 Jul 2005 09:31:41 +0000 (09:31 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Thu, 7 Jul 2005 09:31:41 +0000 (09:31 +0000)
helm/matita/matitaDb.ml
helm/matita/matitaDb.mli
helm/matita/matitaclean.ml

index 4e8691f9390316d736ab6455006da7ace0205adc..b5b64d46f1d958c7d9c02a48a099253bb3137176 100644 (file)
@@ -105,6 +105,7 @@ let create_owner_environment () =
          let status = Mysql.status dbd in
          match status with 
          | Mysql.StatusError Mysql.Table_exists_error -> ()
+         | Mysql.StatusError Mysql.Dup_keyname -> ()
          | Mysql.StatusError _ -> raise exn
          | _ -> ()
       ) statements
@@ -163,7 +164,3 @@ let xpointers_of_ind uri =
   Mysql.iter rc (fun a ->  match a.(0) with None ->()|Some a -> l := a:: !l);
   List.map UriManager.uri_of_string !l
 
-let reset_owner_environment () =
-  clean_owner_environment ();
-  create_owner_environment ()
-
index f6d8c1fd111f44d6edcb7c8ae60b68eb005b2f7f..09eff29893318b241d8abd6b8b0fd15a9da6374d 100644 (file)
@@ -25,8 +25,8 @@
 
 val instance: unit -> Mysql.dbd
 
-val reset_owner_environment : unit -> unit
 val create_owner_environment: unit -> unit
+val clean_owner_environment: unit -> unit
 
 val remove_uri: UriManager.uri -> string list
 val xpointers_of_ind: UriManager.uri -> UriManager.uri list
index f14c5e80ea8b4aae3c8f6aabc25f769887870d53..1ee09d96835f0a940932cf69834277eae93d4d58 100644 (file)
@@ -12,7 +12,9 @@ let usage () =
   prerr_endline "";
   prerr_endline "usage:";
   prerr_endline "\tmatitaclean all";
-  prerr_endline "\tmatitaclean (uri|file)+";
+  prerr_endline "\t\tcleans the whole environment";
+  prerr_endline "\tmatitaclean files...";
+  prerr_endline "\t\tcleans the output of the compilation of files...\n";
   prerr_endline "";
   exit 1
     
@@ -20,7 +22,7 @@ let _ =
   if Array.length Sys.argv < 2 then usage ();
   if Sys.argv.(1) = "all" then 
     begin
-      MatitaDb.reset_owner_environment ();
+      MatitaDb.clean_owner_environment ();
       exit 0
     end
   let uri_to_remove =ref [] in