Provided by: libarch-perl_0.5.2-2_all bug

NAME

       Arch::Storage - abstract class to access arch archives

SYNOPSIS

           use base 'Arch::Storage';

           # see synopsis of concrete classes

DESCRIPTION

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

       The methods usually return arrayref if not otherwise specified, and are not affected by the list context
       (except for working_names).

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 instance of the concrete subclass (i.e. Arch::Session or Arch::Library).

       instance
           Alternative constructor. Return the last created instance of the concrete subclass (i.e.
           Arch::Session or Arch::Library) or create a new one.

           The purpose of this alternative constructor is to allow the singleton behaviour as well as certain
           Aspect Oriented Programming practices.

           Theoretical note: this design is acceptably good, and mixing new and instance constructors in the
           code usually does what is intended. However, if someone actually creates more than one object of any
           subclass, he has two choices to enforce correctness. Either only use instance method in the code
           (singleton pattern), or alternatively create a temporary new object before calling methods of other
           classes that internally use instance to work with this subclass.

       init %args
           Initialize or reset the object state.

       working_name [name]
           Set or get the default working operand for other methods.

           The argument may be anything that Arch::Name constructor accepts, i.e. fully qualified string,
           arrayref, hashref or Arch::Name instance.  If needed, name is converted to Arch::Name instance, and
           this is what is returned. Note that this object behaves as fully qualified name in string context.

       working_names [archive ..]
           Similar to working_name, but accepts and returns a list of name components, from archive to revision.

           This method is provided for convenience and backward compatibility only.  You may as well use
           working_name instead, just enclose the argument list into arrayref, and call to_array on the returned
           object.

       fixup_name_alias
           Replace (if needed) the "FIRST" and "LATEST" components of the working name's version and revision
           with the actual values by querying the storage.

       is_archive_managed [archive]
           Return true or false depending on whether the archive is known to the storage.

           If given, the argument is used instead of the default working_name.

       expanded_revisions
           Return all revisions in all archives, each revision is Arch::Name object.

       archives
           Return all registered (or otherwise known) archives.

       categories [archive]
       branches   [category]
       versions   [branch]
       revisions  [version]
           Return all categories, branches, versions or revisions respectively in the immediate parent,
           similarly to the corresponding tla commands.

           If given, the argument is used instead of the default working_name.

       get_revision_descs [version]
           Return describing hash for every revision in the version.

           If given, the argument is used instead of the default working_name.

           The revision hashes have the following fields:

           name
               The revision name (i.e. "base-0", "patch-X", "version-0" 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.