Package pybaz :: Class Archive
[frames] | no frames]

Class Archive

source code

     object --+                    
              |                    
NamespaceObject --+                
                  |                
   RevisionIterable --+            
                      |            
        VersionIterable --+        
                          |        
             BranchIterable --+    
                              |    
               CategoryIterable --+
                                  |
                                 Archive

Arch archive namespace object.

In the Arch revision control system, archives are the units of
storage. They store revisions organized in categories, branches
and versions, and are associated to a `name` and a `location`.

:see: `Category`, `Branch`, `Version`, `Revision`



Instance Methods
 
__getitem__(self, category)
Instanciate a Category belonging to this archive.
 
__init__(self, name)
Create an archive object from its registered name.
 
all_locations(self)
All registered locations for this archive.
 
exists(self)
Does this namespace exists? Within the Arch model, history cannot be changed: created archive entries cannot be deleted.
 
get_categories(self)
Deprecated.
 
get_fullname(self)
Deprecated Fully qualified name of this namespace object.
 
get_has_listings(self)
Deprecated.
 
get_is_mirror(self)
Deprecated.
 
get_is_signed(self)
Deprecated.
 
get_library_categories(self)
Deprecated.
 
get_location(self)
Deprecated.
 
get_name(self)
Deprecated.
 
get_official_name(self)
Deprecated.
 
is_registered(self)
Is this archive registered? :return: Whether the location associated to this registration name is known.
 
iter_categories(self)
Iterate over archive categories.
 
iter_library_categories(self)
Iterate over library categories.
 
iter_location_revisions(self, location)
Revisions present in the specified archive location.
 
iter_location_versions(self, location)
Versions present in the specified archive location.
 
make_mirror(self, name, location, signed=False, listing=False, tla=False)
Deprecated.
 
mirror(self, limit=None, fromto=None, no_cached=False, cached_tags=False)
Deprecated.
 
unregister(self)
Unregister this archive.

Inherited from CategoryIterable: iter_branches, iter_library_branches

Inherited from BranchIterable: iter_library_versions, iter_versions

Inherited from VersionIterable: iter_library_revisions, iter_revisions

Inherited from NamespaceObject: __eq__, __ne__, __repr__, __str__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Properties
  categories
Deprecated.
  fullname
Fully qualfied name of this namespace object.
  has_listings
Deprecated.
  is_mirror
Deprecated.
  is_signed
Deprecated.
  library_categories
Deprecated.
  location
Deprecated.
  name
Logical name of the archive.
  official_name
Deprecated.
  version_string
Deprecated.

Inherited from object: __class__

Method Details

__getitem__(self, category)
(Indexing operator)

 
Instanciate a Category belonging to this archive.

:param category: unqualified category name
:type category: str
:rtype: `Category`

__init__(self, name)
(Constructor)

 
Create an archive object from its registered name.

:param name: archive name, like "jdoe@example.com--2003"
:type name: str
:raise errors.NamespaceError: invalid archive name.

Overrides: object.__init__

all_locations(self)

 
All registered locations for this archive.

:rtype: list of `ArchiveLocation`

exists(self)

 
Does this namespace exists?

Within the Arch model, history cannot be changed: created archive
entries cannot be deleted. However, it is possible to ``unregister`` an
archive, or to find references to archives whose location is not known.
Thus, existence cannot always be decided. Testing for the existence of
a name in a non-registered archive raises
`errors.ArchiveNotRegistered`.

:return: whether this namespace object exists.
:rtype: bool
:raise errors.ArchiveNotRegistered: the archive name is not registered,
    so existence cannot be decided.
:raise errors.ExecProblem: there was a problem accessing the archive.

Overrides: NamespaceObject.exists
(inherited documentation)

get_categories(self)

 
Deprecated.

Categories in this archive.

:rtype: tuple of `Category`
:see: `iter_categories`

get_fullname(self)

 
Deprecated

Fully qualified name of this namespace object.

:rtype: str
:see: `NamespaceObject.fullname`

Overrides: NamespaceObject.get_fullname
(inherited documentation)

get_has_listings(self)

 
Deprecated.

Does the archive provide .listing file for http access?

:see: `ArchiveLocation._meta_info_present`
:rtype: bool

get_is_mirror(self)

 
Deprecated.

Is this archive registration a mirror?

:see: `ArchiveLocation._meta_info_present`
:rtype: bool

get_is_signed(self)

 
Deprecated.

Is the archive GPG-signed?

:see: `ArchiveLocation._meta_info_present`
:rtype: bool

get_library_categories(self)

 
Deprecated.

Categories in this archive  present in the library.

:rtype: tuple of `Category`
:see: `iter_library_categories`

get_location(self)

 
Deprecated.

URI of the archive, specifies location and access method.

:rtype: str
:see: `Archive.all_locations`

get_name(self)

 
Deprecated.

Logical name of the archive.

:rtype: str
:see: `Archive.name`

get_official_name(self)

 
Deprecated.

Official archive name of this archive registration.

:see: `ArchiveLocation._meta_info_present`
:rtype: str

is_registered(self)

 
Is this archive registered?

:return: Whether the location associated to this registration name is
    known.
:rtype: bool
:see: `register_archive`, `Archive.unregister`

iter_categories(self)

 
Iterate over archive categories.

:return: all existing categories in this namespace.
:rtype: iterable of `Category`
:precondition: `self.exists()` returns ``True``.

Overrides: CategoryIterable.iter_categories
(inherited documentation)

iter_library_categories(self)

 
Iterate over library categories.

:return: categories in this namespace which are present in the
    revision library.
:rtype: iterable of `Category`

Overrides: CategoryIterable.iter_library_categories
(inherited documentation)

iter_location_revisions(self, location)

 
Revisions present in the specified archive location.

:warning: This is a temporary facility that does no sanity checking. It
will be removed shortly after bound namespace objects are properly
implemented.

iter_location_versions(self, location)

 
Versions present in the specified archive location.

:warning: This is a temporary facility that does no sanity checking. It
will be removed shortly after bound namespace objects are properly
implemented.

make_mirror(self, name, location, signed=False, listing=False, tla=False)

 
Deprecated.

:see: `ArchiveLocation.create_mirror`

:param name: name of the new mirror (for example
    'david@allouche.net--2003b-MIRROR').
:type name: str
:param location: writeable URI were to create the archive mirror.
:type location: str
:param signed: create GPG signatures for the mirror contents
:type signed: bool
:param listing: maintains ''.listing'' files to enable HTTP access.
:type listing: bool
:param tla: create a tla archive instead of a baz archive.
:type tla: bool

:return: object for the newly created archive mirror.
:rtype: `Archive`

:precondition: `self.is_registered()`
:precondition: ``name`` is not a registered archive name
:precondition: ``location`` does not exist and can be created
:postcondition: Archive(name).is_registered()

:raise errors.NamespaceError: ``name`` is not a valid archive name.

mirror(self, limit=None, fromto=None, no_cached=False, cached_tags=False)

 
Deprecated.

:see: `ArchiveLocation.make_mirrorer`

:param limit: restrict mirrorring to those archive items. All items
    must belong to this archive.
:type limit: iterable of at least one ArchiveItem or str

:param fromto: update the mirror specified by the second item with the
    contents of the archive specified by the first item.
:type fromto: sequence of exactly two Archive or str.

:precondition: If ``fromto`` is provided, both items must be registered
    archives names whose official name is this archive.

:param no_cached: do not copy cached revisions.
:type no_cached: bool

:param cached_tags: copy only cachedrevs for tags to other archives.
:type cached_tags: bool

unregister(self)

 
Unregister this archive.

:precondition: `self.is_registered()`
:postcondition: not `self.is_registered()`
:see: `register_archive`


Property Details

categories


Deprecated.

Categories in this archive.

:type: tuple of `Category`
:see: `iter_categories`

Get Method:
pybaz.Archive._get_categories(self)

fullname


Fully qualfied name of this namespace object.

:type: str

Get Method:
pybaz.Archive._get_name(self)

has_listings


Deprecated.

:see: `ArchiveLocation._meta_info_present`
:type: bool

Get Method:
pybaz.Archive._get_has_listings(self)

is_mirror


Deprecated.

:see: `ArchiveLocation._meta_info_present`
:type: bool

Get Method:
pybaz.Archive._get_is_mirror(self)

is_signed


Deprecated.

:see: `ArchiveLocation._meta_info_present`
:type: bool

Get Method:
pybaz.Archive._get_is_signed(self)

library_categories


Deprecated.

Categories in this archive  present in the library.

:type; tuple of `Category`
:see: `iter_library_categories`

Get Method:
pybaz.Archive._get_library_categories(self)

location


Deprecated.

For example 'http://ddaa.net/arch/2004', or
'sftp://user@sourcecontrol.net/public_html/2004'.

:see: `Archive.all_locations`
:type: str

Get Method:
pybaz.Archive._get_location(self)

name


Logical name of the archive.

:type: str

Get Method:
pybaz.Archive._get_name(self)

official_name


Deprecated.

:see: `ArchiveLocation._meta_info_present`
:type: str

Get Method:
pybaz.Archive._get_official_name(self)

version_string


Deprecated.

Contents of the ``.archive-version`` file at the root of the archive.

:see: `ArchiveLocation._version_string`
:type: str

Get Method:
pybaz.Archive._get_version_string(self)