let analyse_update_file f =
  try
    let s = input_file_as_string f in
    let l = Str.split (Str.regexp "\n") s in
    let f acc str =
      try
        let action = Ocvs_types.update_action_of_string (String.sub str 0 1) in
        let file = String.sub str 2 ((String.length str) - 2) in
        let info = (file, action) in
        acc @ [info]
      with
        _ ->
          acc
    in
    List.fold_left f [] l
  with
    Sys_error s ->
      raise (Ocvs_types.CvsFailure s)