VCS::LibCVS.3pm

Langue: en

Autres versions - même langue

Version: 2005-10-10 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

VCS::LibCVS - Access CVS working directories and repositories.

SYNOPSIS

Please see the example script, examples/lcvs-example.
   $working_dir = VCS::LibCVS::WorkingDirectory->new(File::Spec->curdir);
 
 

DESCRIPTION

LibCVS provides native Perl access to CVS.

These docs assume some familiarity with concepts of CVS. For example, the term ``Working Directory'' (or sandbox) refers to a collection of directories and files which have been checked out of CVS.

The API is provided through a collection of classes. They come in 3 groups, Working Directory Classes, Repository Classes, and Other Classes. A brief description of each class is provided here, for more details see its perldoc.

For a language independent description of the API, please see the docs at libcvs.cvshome.org.

Working Directory classes

These classes give you access to the stuff in a working directory, as governed by the standard CVS working directory admin information (CVS/*). They also provide several ways to get at information the repository, or compare against what's in the repository.

You will probably find the need to construct objects of these types explicitly.

VCS::LibCVS::WorkingFileOrDirectory
A parent class for all the types of files and directories that you find in a working directory.
VCS::LibCVS::WorkingFile
A file which is being managed by CVS. It has either been checked out of the repository, or given to CVS with ``cvs add''.
VCS::LibCVS::WorkingDirectory
A directory which is being managed by CVS.
VCS::LibCVS::WorkingUnmanagedFile
A file which upsets CVS. It's in a CVS working directory, but it's not in the repository, it has been ``cvs add''ed, and it's not in any of the ignore lists.

Repository classes

These classes give you access to the stuff in the repository. They use the remote protocol to get at the repository, so they don't require any local CVS directory. You will need a CVSROOT to find the repo though.

The only classes here that you should need to construct explicitly are those named VCS::LibCVS::Repository*.

VCS::LibCVS::Repository
The CVS repository.
VCS::LibCVS::RepositoryFileOrDirectory
Parent class for repository files and directories.
VCS::LibCVS::RepositoryFile
A file in the repository. It's really a collection of revisions, and a bunch of branch and tag information too.
VCS::LibCVS::RepositoryDirectory
A directory in the repository. Really just a container for files, but it is treated as having branches.
VCS::LibCVS::DirectoryBranch
A branch of a directory. This is really just a stepping stone to getting specific branches of many files at once.
VCS::LibCVS::FileBranch
A specific branch of a file. Or a collection of revisions from another perspective.
VCS::LibCVS::FileRevision
A specific revision of a file.
VCS::LibCVS::Branch
A branch across the repository. This is not much more than a wrapper around a branch name.
VCS::LibCVS::Slice
A slice through the repository. A set of file revisions, with at most one revision per file.

Other classes

These classes are used by both the groups of classes above.
VCS::LibCVS::Datum and children
These classes reprsent various common bits of information in CVS, for example, revision numbers. You shouldn't need to construct these directly, they are returned by various routines in the other objects.

WARNINGS

Absolute And Relative Filenames

Objects are created using filenames. These may be relative or absolute, and are stored as such, so be careful if you change the current directory.

Root vs. Repository

A repository is a place where managed files are stored. A root is a string which specifies a repository.

CONFIGURATION VARIABLES

@Authentication_Functions

A list of functions that LibCVS will call when it's trying to authenticate to the server. The functions will be called in order, until one responds with proper credentials. If an authentication scheme has multiple steps, then the same function will be called repeatedly for each step.

They have this signature:

\%credentials get_credentials($scheme, \@needed, \%info)

$scheme is a string, eg pserver, kerberos, . . .
Its value is determined from the CVSROOT.
@needed are strings naming the needed information
A list of parameters this scheme needs to authenticate successfully, eg ``scrambled_password'' for pserver. Each authentication scheme defines different needed parameters. They are documented with the authentication scheme. You may find such documentation in the documentation for your connection class, eg ``VCS::LibCVS::Client::Connection::Pserver'' for the pserver scheme.
%info is information required to authenticate
What is included in here is also documented as part of the authentication scheme. For example, a challenge response scheme will provide the challenge in here, with the key ``Challenge''.

A VCS::LibCVS::Datum::Root object will always be available through the key ``CVSRoot''.

%credentials values for needed parameters, or undef
If the function can't authenticate for any reason, it can return undef to signal this. Otherwise, for each parameter named in @needed, there must be a key in here with the same name, whose value is the required information.

By default one function is inserted to this list by the Pserver connection module. This function handles password prompting, and the manipulation of the .cvspass file. This default function can be removed by emptying the list. See VCS::LibCVS::Client::Connection::Pserver::auth_cvspass for details on configuring this function..

$Admin_Dir_Name scalar string, default CVS

The name of the sandbox admin directory.

$Cache_FileRevision_Contents_by_Repository boolean, default 1

True means that results of fetching the contents of a file revision should be cached for each Repository object. This cache is necessary because of the way CVS works; it won't return the contents of the same revision twice in a row over a single client connection. You shouldn't change this unless you really know what you are doing. It is used in the routine VCS::LibCVS::FileRevision->get_contents().

$Cache_Repository boolean, default 1

True means that VCS::LibCVS::Repository objects should be cached and reused. If you construct a Repository object, and one already exists with the same root, then the existing one will be reused. Roots are compared as strings, so different usernames, alias hostnames, and symlinks in repository directories will defeat the cache. This is of course risky for multi-thread environments.

This also results in connection caching, since each repository object keeps an open connection to the server.

$Cache_RepositoryFileOrDirectory boolean, default 1

True means that VCS::LibCVS::RepositoryFileOrDirectory objects should be cached and reused. If you construct a RepositoryFileOrDirectory object, and one already exists with the same filename and repository, then the existing one will be reused. This is of course risky for multi-thread environments.

SEE ALSO

POD ERRORS

Hey! The above document had some coding errors, which are explained below:
Around line 170:
You forgot a '=back' before '=head2'