module Ocvs_commands: sig
.. end
Functions executing cvs commands.
val print_DEBUG : 'a -> unit
val delete_file : string -> unit
val absolute_name : string -> string
val remove_n_first_lines : int -> string -> string
val get_nth_line : int -> string -> string
val partition_files_by_dir : string list -> (string * string list) list
partition_files_by_dir files
return a list of
pairs (dir, list of files (basename)) from the given list of files.
val input_file_as_string : string -> string
This function returns a file in the form of one string.
val analyse_status_file : string -> Ocvs_types.cvs_info list
val analyse_update_file : string -> (string * Ocvs_types.update_action) list
val status_dir : string -> Ocvs_types.cvs_info list
Return a list of cvs_info
for the files handled by cvs in
the given directory, not recursively.
val status_file : string -> Ocvs_types.cvs_info
Return a cvs_info
for the given file.
Raises CvsFailure
if an error occurs (for example the file
is not handled by CVS).
val status_files : string list -> Ocvs_types.cvs_info list
Return a list of cvs_info
for the files handled by cvs in
the given list of files.
val commit_files_in_dir : ?comment:string -> string -> string list -> unit
val commit_files : ?comment:string -> string list -> unit
val commit_dir : ?comment:string -> string -> unit
val update_dir : ?recursive:bool -> string -> (string * Ocvs_types.update_action) list
val add_dir : string -> unit
val create_and_add_dir : string -> unit
val add_files : ?binary:bool -> string list -> string list * string list
Return the list of added files, which must then have
the "Locally Added" status, and the list of files
for which an error occured.
val remove_files : string list -> string list * string list
val diff_file : ?rev:Ocvs_types.cvs_revision ->
?rev2:Ocvs_types.cvs_revision -> string -> Odiff.diffs * string
Get the last modifications of the given file,
or between two revisions, or between a revision
and the working file. Also gives the archive filename.
Warning : Never give rev2
without rev
.
val rcs_revision : Ocvs_types.cvs_revision -> string -> string
Get the content of a revision from the RCS archive in a file
and return the name of the file.
val read_revisions : string -> Ocvs_types.cvs_revision list
Read the list of revisions in a file from a file created
by the cvs log command.
val revisions_file : string -> Ocvs_types.cvs_revision list
Get the list of the revisions of a file.
Raises Ocvs_types.CvsFailure
if an error occurs.
Functions for tags
val read_tags : string -> (string * string) list
Read the list of tags in a file from a file created by the cvs log command.
val tags_file : string -> (string * string) list
Get the list of tags in the given file.
Returns a list of (tag, revision number) (both are strings).
val check_tag : string -> unit
Check the syntax of the given tag.
Raises Tag_error
if the tag is incorrect.
val file_has_tag : string -> string -> bool
Return true if the given file alerady has the given tag.
val get_cvs_files : string -> string list
Return the list of CVS files in the given directory and in its subdirectories.
val tag_files : (string -> bool) -> string -> string list -> unit
Add a tag to a list of files. The tag syntax is checked before
any CVS command is performed.
RaisesTag_error
if the given tag is incorrect.
CvsFailure
if the CVS command fails.
f_confirm
: is a function taking a string and returning true or
false if the user confirm or not the message.
val tag_dir : ?recursive:bool -> (string -> bool) -> string -> string -> unit
Add a tag to a directory. The tag syntax is checked before
any CVS command is performed.
RaisesTag_error
if the given tag is incorrect.
CvsFailure
if the CVS command fails.
f_confirm
: is a function taking a string and returning true or
false if the user confirm or not the message.
val log : string -> string
Return the result string of the cvs log
command for the given
file handled by cvs.