* the admin) at a scheduled time, so no concurrent instances and no CS needed
* also, svn should already be safe as far as concurrency is concerned *)
let commit user files =
- let rt_dir = Helm_registry.get "matita.rt_base_dir" in
- let _repo = Helm_registry.get "matita.weblib" in
-
- let files = String.concat " "
- (List.map ((^) (rt_dir ^ "/users/" ^ user ^ "/")) files) in
-
- let errno, outlines, errlines = exec_process
- ("svn ci --non-interactive --message \"commit by user " ^ user ^ "\" " ^ files)
- in
- if errno = 0 then
- "BEGIN COMMIT - " ^ user ^ ":\n" ^ (string_of_output outlines errlines) ^ "END COMMIT - " ^ user ^ "\n\n"
- else raise (SvnError (string_of_output outlines errlines))
+ if (List.length files > 0) then
+ (let rt_dir = Helm_registry.get "matita.rt_base_dir" in
+ let _repo = Helm_registry.get "matita.weblib" in
+
+ let files = String.concat " "
+ (List.map ((^) (rt_dir ^ "/users/" ^ user ^ "/")) files) in
+
+ let errno, outlines, errlines = exec_process
+ ("svn ci --non-interactive --message \"commit by user " ^ user ^ "\" " ^ files)
+ in
+ if errno = 0 then
+ "BEGIN COMMIT - " ^ user ^ ":\n" ^ (string_of_output outlines errlines) ^ "END COMMIT - " ^ user ^ "\n\n"
+ else raise (SvnError (string_of_output outlines errlines)))
+ else ("COMMIT nothing to do for " ^ user ^ "\n")
;;