The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::SCM::Digest::SCM

DESCRIPTION

Interface for the operations required of a SCM by App::SCM::Digest.

INTERFACE METHODS

new

Constructor for the implementation. If the implementation is not supported, this call should die.

clone

Takes a repository URL and a directory name as its arguments. Clones (i.e. checks out a local copy of) the repository into the specified directory.

open_repository

Takes a repository path as its single argument. "Opens" the repository, typically by way of chdir. Once a repository is opened, subsequent method calls will operate on that repository, until open is called again or chdir is executed in some other context.

is_usable

Returns a boolean indicating whether other operations may be performed on this repository. Should be called immediately after calling open_repository, and prior to calling any other repository-specific method.

pull

Pulls pending updates from the remote repository.

branches

Returns an arrayref mapping from branch name to the last commit received for that branch.

branch

Returns the currently-checked-out branch name.

checkout

Takes a branch name as its single argument, and checks out that branch.

commits_from

Takes a branch name and a commit ID as its arguments, and returns an arrayref containing all commits on that branch that were received after the given commit. The arrayref is in order from least to most recent, i.e. the last element of the arrayref contains the most recent commit.

has

Takes a commit ID as its single argument. Returns a boolean indicating whether the commit is present in the history for the current branch.

show

Takes a commit ID as its single argument. Returns the basic details of the commit as an arrayref of strings. This typically contains details like commit time, author, and commit message.

show_all

Takes a commit ID as its single argument. Returns the basic details of the commit, plus the diff of the commit, as an arrayref of strings.