NAME

Arch::Storage - abstract class to access arch archives

SYNOPSIS

use base 'Arch::Storage';

# implement pure virtual methods:
#   archives, branches, versions, revisions, expanded_archive_info

DESCRIPTION

Arch::Storage provides some common methods to query content of arch archive.

METHODS

The following (implemented and pure virtual) methods are common to subclasses:

new, init, working_name, working_names, fixup_name_alias, is_archive_managed, expanded_revisions.

archives, categories, branches, versions, revisions, get_revision_descs, expanded_archive_info, get_revision_changeset, get_changeset, get_revision_log, get_log.

new [args]

Create a new subclass (i.e. Arch::Session or Arch::Library) instanse.

init
working_name name
working_names subnames ..
fixup_name_alias

To be documented.

is_archive_managed [archive]

The argument may be anything Arch::Name constructor accepts (i.e. fully qualified string, arrayref, hashref or Arch::Name instanse). If no argument is specified, the working_name default is used.

expanded_revisions

Currently works on working_name only (will be enhanced).

archives

Returns a list of registered archives.

categories [archive]
branches [category]
versions [branch]
revisions [version]

Returns a list of categories, branches, versions or revisions respectively.

The argument may be anything Arch::Name constructor accepts (i.e. fully qualified string, arrayref, hashref or Arch::Name instanse). If no argument is specified, the working_name default is used.

get_revision_descs [version]

Returns describing hash for every revision in the specified version, which defaults to working_names if omitted.

The revision hashes have the following fields:

name

The revision name (i.e. base-0, patch-X, version-X or versionfix-X)

summary

The revision's commit log's summary line

creator

The name part of the committers tla my-id (i.e. John Hacker)

email

The email address part of the committers tla my-id (i.e. jhacker@nowhere.org)

date

The revisions commit date in %Y-%m-%d %H:%M:%S %Z format (see strftime(3))

kind

The kind of revision (i.e. one of tag, import, cset or unknown)

expanded_archive_info [archive]

Returns a tree of categories, branches and versions in the archive. The archive defaults to working_names.

Returns a reference to a list of categories. Every category is a list consisting of the category name and a list of branches. Every branch is a list consisting of the branch name and a list of versions. Every version is list consisting of the version number and the first and last revision name.

[
  [ "category1", [
    [ "branch1", [
      [ "version1", "first_revision1", "last_revision1" ],
      [ "version2", "first_revision2", "last_revision2" ],
      ...
    ],
    ...
  ],
  ...
]
get_revision_changeset revision [dir]
get_changeset [dir]

Fetches the changeset for revision or working_name and returns an Arch::Changeset for it. If dir is specified, it will be used to store the contents of the changeset. Otherwise a new temporary directory will be created.

get_revision_log revision
get_log

Fetch the log for the revision or working_name. Returns an Arch::Log object.

BUGS

No known bugs.

AUTHORS

Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel).

Enno Cramer (uebergeek@web.de--2003/arch-perl--devel).

SEE ALSO

For more information, see tla, Arch::Session, Arch::Library.