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

Type Version

     object --+                
              |                
NamespaceObject --+            
                  |            
        ArchiveItem --+        
                      |        
           CategoryItem --+    
                          |    
                 BranchItem --+
                              |
         object --+           |
                  |           |
    NamespaceObject --+       |
                      |       |
       RevisionIterable --+   |
                          |   |
     object --+           |   |
              |           |   |
NamespaceObject --+       |   |
                  |       |   |
        ArchiveItem --+   |   |
                      |   |   |
              Setupable --+   |
                          |   |
                    Package --+
                              |
             object --+       |
                      |       |
        NamespaceObject --+   |
                          |   |
           RevisionIterable --+
                              |
                             Version


Arch version namespace object.


See Also:

Archive, Category, Branch, Revision

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

Revision

__getitem__(self, idx)
Instanciate a revision belonging to this version.

Version

as_version(self)
Deprecated.

bool

exists(self)
Does this namespace exists?

WorkingTree

get(self, dir, link)
Construct a project tree for this version.

tuple of Revision

get_library_revisions(self, reverse)
Deprecated.

tuple of Revision

get_revisions(self, reverse)
Deprecated.

iterator of Revision

iter_cachedrevs(self)
Iterate over the cached revisions in this version.

iterable of Revision

iter_library_revisions(self, reverse)
Iterate over library revisions.
  iter_location_revisions(self, location)
Revisions present in this version at specified archive location.

iterable of Revision

iter_merges(self, other, reverse, metoo)
Iterate over merge points in this version.

iterable of Revision

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

Branch

get_branch(self)
Deprecated.
    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 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 Revision

library_revisions: Deprecated.

tuple of Revision

revisions: Deprecated.
    Inherited from BranchItem

Branch

branch: Branch which contains this namespace object.
    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 Version object from its name.

Parameters:
name -

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


           (type=

str

)
Overrides:
pybaz.ArchiveItem.__init__

Note:

Nameless branches have no "branch" part in their name.

__getitem__(self, idx)
(Indexing operator)

Instanciate a revision belonging to this version.

Given a string, instanciate the revision of this version with the given patchlevel. For example Version('jdoe@example.com/frob--devel--0')['patch-1'] is equivalent to Revision('jdoe@example.com/frob--devel--0--patch-1').

Given an integer, instanciate the existing revision of this version with the given index. For example, if version contains at least one revision, version[0] is equivalent to version['base-0'], and version[-1] is equivalent to version.latest_revision().

Parameters:
idx -

patch level, or revision number


           (type=

str, int

)
Returns:

Revision

Raises:
NamespaceError -

argument is a string not a valid version patchlevel.

ValueError -

argument is an integer and the version contains no revision with that index.

as_version(self)

Deprecated.

This version.

Returns:

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(self, dir, link=False)

Construct a project tree for this version.

Extract the latest revision for this version from the archive. That is a shortcut for version.latest_revision.get(dir). It can be susceptible to race conditions when a concurrent transaction occurs on the same version, yielding a latter revision that what you may have meant.

Parameters:
dir -

path of the project tree to create. Must not already exist.


           (type=

str

)
link -

hardlink files to revision library instead of copying


           (type=

bool

)
Returns:

newly created project tree.


           (type=

WorkingTree

)

get_library_revisions(self, reverse=False)

Deprecated.

Revisions in this version present in the library.

Returns:

tuple of Revision

See Also:

iter_library_revisions

get_revisions(self, reverse=False)

Deprecated.

Revisions in this version.

Returns:

tuple of Revision

See Also:

iter_revisions

iter_cachedrevs(self)

Iterate over the cached revisions in this version.

Returns:

iterator of Revision

iter_library_revisions(self, reverse=False)

Iterate over library revisions.

Parameters:
reverse -

reverse order, recent revisions first.


           (type=

bool

)
Returns:

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


           (type=

iterable of Revision

)
Overrides:
pybaz.RevisionIterable.iter_library_revisions (inherited documentation)

iter_location_revisions(self, location)

Revisions present in this version at specified archive location.

will be removed shortly after bound namespace objects are properly implemented.

Warning:

This is a temporary facility that does no sanity checking. It

iter_merges(self, other=None, reverse=False, metoo=True)

Iterate over merge points in this version.

This method is mostly useful to save multiple invocations of the command-line tool and multiple connection to a remote archives when building an ancestry graph. Ideally, it would not be present and the desired merge graph traversal would be done using the new_patches and merges properties of Patchlog objects.

Parameters:
other -

list merges with that version.


           (type=

Version

)
reverse -

reverse order, recent revisions first.


           (type=

bool

)
metoo -

do not report the presence of a patch within itself


           (type=

bool

)
Returns:

Iterator of tuples (R, T) where R are revisions in this version and T are iterable of revisions in the other version.


           (type=

iterable of Revision

)

iter_revisions(self, reverse=False)

Iterate over archive revisions.

Parameters:
reverse -

reverse order, recent revisions first.


           (type=

bool

)
Returns:

all existing revisions in this namespace.


           (type=

iterable of Revision

)
Overrides:
pybaz.RevisionIterable.iter_revisions (inherited documentation)

Precondition:

self.exists() returns True.


Property Details

library_revisions

Deprecated.

Revisions in this version present in the library.

revisions

Deprecated.

Revisions in this version.


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