VERSION CONTROL WRAPPER
Each version control module must provide these functions:
XXX_command(url_tail, url_dict, nodelist, action)
Execute a version control system command.
XXX_list(url_tail, url_dict, directory, recursive)
List entries currently in the version control system.
Where "XXX" is equal to what appears in the "commit" attribute before "://".
E.g., for "sccs://" the function is sccs_command().
Common arguments are:
url_tail String: part of the "commit" attribute after XXX://.
For: {commit = cvs://:pserver:
[email protected]/root {path = bar}}
url_tail is: :pserver:
[email protected]/root
It can be empty, in which case the module must figure out the
required parameters itself.
url_dict Dictionary of the "commit" attribute and its attributes.
For: {commit = cvs://asdf/root {path = foobar}}
url_dict is: {"name" : "cvs://asdf/root", "path" : "foobar"}.
Useful attributes:
path path to directory with nodes
logentry message for commit log
tag name for this version
The arguments for XXX_command() are:
nodelist List of Node objects for which the action is to be carried
out.
action String: Command to be executed. First argument of the
":verscont" command. Predefined are:
refresh Update local version from repository.
No-op for files that are already up-to-date.
commit Update the repository for local changes.
No-op for file that didn't change.
File is added to repository when necessary.
Do checkout/checkin when checkout is required.
Don't change locking of the file.
publish Like commit and leave the file unlocked. May also add
a tag to this version.
checkout Like refresh and additionally lock for editing
when possible.
checkin Like commit and leave the file unlocked.
unlock Remove lock on file, don't change file in repository
or locally.
add Add file to repository. File does exist locally.
remove Remove file from repository. File may exist locally.
The return value must be zero when something went wrong, non-zero when the
command worked successfully.
The function can throw a UserError exception when called with wrong arguments.
When there is something wrong that prevents version control to work (e.g., the
repository doesn't exist) it should silently returning zero. A-A-P may try
another method to obtain the file.
The arguments for XXX_list() are:
directory Absolute path name of the directory for which the listing is
requested.
recursive When non-empty or non-zero: recursively list directories.
The return value must be a list of full file names. Directories are also to
be included.