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

Type Branch

         object --+            
                  |            
    NamespaceObject --+        
                      |        
            ArchiveItem --+    
                          |    
               CategoryItem --+
                              |
         object --+           |
                  |           |
    NamespaceObject --+       |
                      |       |
       RevisionIterable --+   |
                          |   |
     object --+           |   |
              |           |   |
NamespaceObject --+       |   |
                  |       |   |
        ArchiveItem --+   |   |
                      |   |   |
              Setupable --+   |
                          |   |
                    Package --+
                              |
         object --+           |
                  |           |
    NamespaceObject --+       |
                      |       |
       RevisionIterable --+   |
                          |   |
            VersionIterable --+
                              |
                             Branch


Arch branch namespace object.


See Also:

Archive, Category, Version, Revision

Method Summary
  __init__(self, name)
Create a Branch object from its name.

Version

__getitem__(self, v)
Instanciate a version belonging to this branch.

Version

as_version(self)
Deprecated.

bool

exists(self)
Does this namespace exists?

tuple of Version

get_library_versions(self, reverse)
Deprecated.

tuple of Version

get_versions(self, reverse)
Deprecated.

iterable of Version

iter_library_versions(self, reverse)
Iterate over library revisions.

iterable of Version

iter_versions(self, reverse)
Iterate over archive versions.

Version

latest_version(self)
Latest version in this branch.
    Inherited from CategoryItem

Category

get_category(self)
Deprecated.
    Inherited from Package

Revision

as_revision(self)
Deprecated.

Revision

latest_revision(self)
Latest revision in this package.
    Inherited from Setupable
  setup(self)
Deprecated.
    Inherited from ArchiveItem

Archive

get_archive(self)
Deprecated.

str

get_fullname(self)
Deprecated

str

get_nonarch(self)
Deprecated.
    Inherited from VersionIterable

iterable of Revision

iter_library_revisions(self, reverse)
Iterate over library revisions.

iterable of Revision

iter_revisions(self, reverse)
Iterate over archive revisions.
    Inherited from NamespaceObject

bool

__eq__(self, x)
Compare types and fully-qualified names.

bool

__ne__(self, x)
Compare types and fully-qualified names.

str

__repr__(self)
Fully-qualified name in angle brackets.

str

__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

tuple of Version

library_versions: Deprecated.

tuple of Version

versions: Deprecated.
    Inherited from CategoryItem

Category

category: Category which contains this object.
    Inherited from ArchiveItem

Archive

archive: Archive which contains this namespace object.

str

fullname: Fully qualfied name of this namespace object.

str

nonarch: Non-arch part of this namespace name.

Method Details

__init__(self, name)
(Constructor)

Create a Branch object from its name.

Parameters:
name -

fully-qualified branch name, like "jdoe@example.com--2004/frob--devo" or "jdoe@example.com--2004/frob".


           (type=

str

)
Raises:
errors.NamespaceError -

name is not a valid branch name.

Overrides:
pybaz.ArchiveItem.__init__

__getitem__(self, v)
(Indexing operator)

Instanciate a version belonging to this branch.

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

Parameters:
v -

branch id.


           (type=

str

)
Returns:

Version

Raises:
NamespaceError -

argument is not a valid version id.

as_version(self)

Deprecated.

Latest version in this branch.

Returns:

Version

Raises:
IndexError -

this branch is empty.

Preconditions:

See Also:

latest_version

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.

Returns:

whether this namespace object exists.


           (type=

bool

)
Raises:
errors.ArchiveNotRegistered -

the archive name is not registered, so existence cannot be decided.

errors.ExecProblem -

there was a problem accessing the archive.

Overrides:
pybaz.NamespaceObject.exists (inherited documentation)

get_library_versions(self, reverse=False)

Deprecated.

Versions in this branch present in the library.

Returns:

tuple of Version

See Also:

iter_library_versions

get_versions(self, reverse=False)

Deprecated.

Versions in this branch.

Returns:

tuple of Version

See Also:

iter_versions

iter_library_versions(self, reverse=False)

Iterate over library revisions.

Parameters:
reverse -

reverse order, higher versions first.


           (type=

bool

)
Returns:

versions in this namespace which are present in the revision library.


           (type=

iterable of Version

)
Overrides:
pybaz.VersionIterable.iter_library_versions (inherited documentation)

iter_versions(self, reverse=False)

Iterate over archive versions.

Parameters:
reverse -

reverse order, higher versions first.


           (type=

bool

)
Returns:

all existing versions in this namespace.


           (type=

iterable of Version

)
Overrides:
pybaz.VersionIterable.iter_versions (inherited documentation)

Precondition:

self.exists() returns True.

latest_version(self)

Latest version in this branch.

Returns:

Version

Raises:
ValueError -

the archive is not registered, or this branch does not exist, or it contains no version.

Preconditions:


Property Details

library_versions

Deprecated.

Versions in this branch present in the library.

versions

Deprecated.

Versions in this branch.


Generated by Epydoc 2.1 on Fri Jul 7 17:05:30 2006 http://epydoc.sf.net