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

Type Category

     object --+                
              |                
NamespaceObject --+            
                  |            
   RevisionIterable --+        
                      |        
        VersionIterable --+    
                          |    
             BranchIterable --+
                              |
         object --+           |
                  |           |
    NamespaceObject --+       |
                      |       |
            ArchiveItem --+   |
                          |   |
                  Setupable --+
                              |
                             Category


Arch category namespace object.

:see: `Archive`, `Branch`, `Version`, `Revision`

Method Summary
  __init__(self, name)
Create a category object from its name.
  __getitem__(self, b)
Instanciate a branch belonging to this category.
  exists(self)
Does this namespace exists? Within the Arch model, history cannot be changed: created archive entries cannot be deleted.
  get_branches(self)
Deprecated.
  get_library_branches(self)
Deprecated.
  iter_branches(self)
Iterate over archive branches.
  iter_library_branches(self)
Iterate over library branches.
    Inherited from Setupable
  setup(self)
Deprecated.
    Inherited from ArchiveItem
  get_archive(self)
Deprecated.
  get_fullname(self)
Deprecated Fully qualified name of this namespace object.
  get_nonarch(self)
Deprecated.
    Inherited from BranchIterable
  iter_library_versions(self, reverse)
Iterate over library revisions.
  iter_versions(self, reverse)
Iterate over archive versions.
    Inherited from VersionIterable
  iter_library_revisions(self, reverse)
Iterate over library revisions.
  iter_revisions(self, reverse)
Iterate over archive revisions.
    Inherited from NamespaceObject
  __eq__(self, x)
Compare types and fully-qualified names.
  __ne__(self, x)
Compare types and fully-qualified names.
  __repr__(self)
Fully-qualified name in angle brackets.
  __str__(self)
Fully-qualified name.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...

Property Summary
  branches: Deprecated.
  library_branches: Deprecated.
    Inherited from ArchiveItem
  archive: Archive which contains this namespace object.
  fullname: Fully qualfied name of this namespace object.
  nonarch: Non-arch part of this namespace name.

Method Details

__init__(self, name)
(Constructor)

Create a category object from its name.

:param name: fully-qualified category name, like
  "jdoe@example.com/frob"
:type name: str
:raise errors.NamespaceError: ``name`` is not a valid category name.
Overrides:
pybaz.ArchiveItem.__init__

__getitem__(self, b)
(Indexing operator)

Instanciate a branch belonging to this category.

For example ``Category('jdoe@example.com/frob')['devel']`` is
equivalent to ``Branch('jdoe@example.com/frob--devel')``.

:param b: branch id.
:type b: str
:rtype: `Category`

:raise NamespaceError: argument is not a valid branch id.

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:
pybaz.NamespaceObject.exists (inherited documentation)

get_branches(self)

Deprecated.

Branches in this category.

:rtype: tuple of `Branch`
:see: `iter_branches`

get_library_branches(self)

Deprecated.

Branches in this category present in the library.

:rtype: tuple of `Branch`
:see: `iter_library_branches`

iter_branches(self)

Iterate over archive branches.

:return: all existing branches in this namespace.
:rtype: iterable of `Branch`
:precondition: `self.exists()` returns ``True``.
Overrides:
pybaz.BranchIterable.iter_branches (inherited documentation)

iter_library_branches(self)

Iterate over library branches.

:return: branches in this namespace which are present in the
    revision library.
:rtype: iterable of `Branch`
Overrides:
pybaz.BranchIterable.iter_library_branches (inherited documentation)

Property Details

branches

Deprecated.

Branches in this category.

:type: tuple of `Branch`
:see: `Category.iter_branches`

library_branches

Deprecated.

Branches in this category present in the library.

:type: tuple of `Branch`
:see: `Category.iter_branches`

Generated by Epydoc 2.1 on Thu Feb 2 14:21:53 2006 http://epydoc.sf.net