NAME

VCI::Abstract::Repository - A repository where version-controlled items are kept.

SYNOPSIS

my $repo = VCI->connect(...); # See VCI.pm for details.

my $projects = $repo->projects;
my $project = $repo->get_project(name => 'Foo');

DESCRIPTION

As mentioned in VCI, a Repository is a "server" where files are stored by your version-control system.

In some VCSes, it's not really a "server", it's just a directory that contains Projects.

METHODS

Accessors

All these accessors are read-only.

root

A string representing the "root" of this repository, in the same format that you'd pass into the command-line client for your VCS. The individual implementations of VCI::Abstract::Repository will describe the format of this string in more detail.

projects

An arrayref of every VCI::Abstract::Project in this repository. In some VCSes, this may just be the projects in the root directory of the repository, or something that doesn't entirely describe everything that's tracked in the system.

vci

The VCI that connected us to this repository. In general, unless you're a VCI implementor, you probably don't care about this.

Getting a Project

get_project
Description

Gets a single VCI::Abstract::Repository from the repository, by name.

Parameters

Takes the following named parameters:

name

The unique name of this Project. Something that uniquely identifies this project in the version control system. Usually, this is just the name of the directory that contains the Project, from the root of the repository.

(For example, mozilla/webtools/bugzilla is the "name" of the Bugzilla project inside of the Mozilla CVS Server.)

Returns

The VCI::Abstract::Project that you asked for. Some VCI::VCS implementations will return a valid Project object even if that object doesn't exist in the Repository. The only way to know if a Project is valid is to perform some operation on it.

Some VCI::VCS implementations will return undef if the Project does not exist in the repository.

If there was some other error than that the Project doesn't exist, this method will die.

CLASS METHODS

Constructors

Usually you won't construct an instance of this class directly, but instead, use "connect" in VCI to get a Repository object.

new

Takes all "Accessors" of this class as named parameters. The following fields are required: "root" and "vci".