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

Type Revision

     object --+                    
              |                    
NamespaceObject --+                
                  |                
        ArchiveItem --+            
                      |            
           CategoryItem --+        
                          |        
                 BranchItem --+    
                              |    
                    VersionItem --+
                                  |
                                 Revision


Arch revision namespace object.


See Also:

Archive, Category, Branch, Version

Method Summary
  __init__(self, name)
Create a Revision object from its name.
  apply(self, tree, reverse)
Replay this revision on this tree.

Revision

as_revision(self)
Deprecated
  cache(self, cache)
Cache a full source tree for this revision in its archive.

bool

exists(self)
Does this namespace exists?

WorkingTree

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

Changeset

get_patch(self, dir)
Fetch the changeset associated to this revision.

Patchlog

get_patchlog(self)
Deprecated.

iterable of RevisionFile

iter_files(self)
Files stored in the archive for that revision.
  make_continuation(self, target)
Create a continuation of this revision in the target version.
  uncache(self)
Remove the cached tree of this revision from its archive.
    Libray Methods
  library_add(self)
Add this revision to the library.
  library_remove(self)
Remove this revision from the library.

LibraryTree

library_find(self)
The copy of this revision in the library.
    History Methods

Revision or None

get_ancestor(self)
Deprecated.

Revision or None

get_previous(self)
Deprecated.

iterable of Revision

iter_ancestors(self, metoo)
Ancestor revisions.
    Inherited from VersionItem

Branch

get_branch(self)
Deprecated.

str

get_patchlevel(self)
Deprecated.

Version

get_version(self)
Deprecated.
    Inherited from CategoryItem

Category

get_category(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

Revision or None

ancestor: Parent revision.

Patchlog

patchlog: Patchlog associated to this revision.

Revision or None

previous: Previous namespace revision.
    Inherited from VersionItem

Branch

branch: Branch which contains this namespace object.

str

patchlevel: Patch-level part of this object's name.

Version

version: Version which contains this revision.
    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

library_add(self)

Add this revision to the library.

Postcondition:

self in self.version.iter_library_revisions()

library_remove(self)

Remove this revision from the library.

Precondition:

self in self.version.iter_library_revisions()

Postcondition:

self not in self.version.iter_library_revisions()

library_find(self)

The copy of this revision in the library.

Returns:

LibraryTree

Precondition:

self in self.version.iter_library_revisions()

get_ancestor(self)

Deprecated.

Parent revision.

Returns:
  • The previous namespace revision, if this revision is regular commit.
  • The tag origin, if this revision is a continuation
  • None if this revision is an import.

           (type=

Revision or None

)

See Also:

Revision.ancestor

get_previous(self)

Deprecated.

Previous namespace revision.

Returns:

the previous revision in the same version, or None if this revision is a base-0.


           (type=

Revision or None

)

See Also:

Revision.previous

iter_ancestors(self, metoo=False)

Ancestor revisions.

Parameters:
metoo -

yield self as the first revision.


           (type=

bool

)
Returns:

all the revisions in that line of development.


           (type=

iterable of Revision

)

__init__(self, name)
(Constructor)

Create a Revision object from its name.

Parameters:
name -

fully-qualified revision, like "jdoe@example.com--2004/frob--devo--1.2--patch-2".


           (type=

str

)
Overrides:
pybaz.VersionItem.__init__

Note:

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

apply(self, tree, reverse=False)

Replay this revision on this tree. Raise on conflict.

Parameters:
tree -

the tree to apply changes to.


           (type=

WorkingTree

)
reverse -

invert the meaning of the changeset; adds become deletes, etc.


           (type=

bool

)
Raises:
errors.ChangesetConflict -

a conflict occured while replaying the revision.

as_revision(self)

Deprecated

Returns this revision. For consistency with Package.as_revision().

Returns:

Revision

cache(self, cache=None)

Cache a full source tree for this revision in its archive.

Parameters:
cache -

cache root for trees with pristines.


           (type=

bool

)

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 revision.

Extract this revision from the archive.

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_patch(self, dir)

Fetch the changeset associated to this revision.

Parameters:
dir -

name of the changeset directory to create. Must not already exist.


           (type=

str

)
Returns:

changeset associated to this revision.


           (type=

Changeset

)

get_patchlog(self)

Deprecated.

Patchlog associated to this revision.

Returns:

Patchlog

See Also:

Revision.patchlog

iter_files(self)

Files stored in the archive for that revision.

Returns:

iterable of RevisionFile

make_continuation(self, target)

Create a continuation of this revision in the target version.

Parameters:
target -

version to create a continuation into. If it does not exist yet, it is created.


           (type=

Version

)

uncache(self)

Remove the cached tree of this revision from its archive.


Property Details

ancestor

Parent revision.

  • The previous namespace revision, if this revision is regular commit.
  • The tag origin, if this revision is a continuation
  • None if this revision is an import.

patchlog

Patchlog associated to this revision.

The Patchlog object is created in __init__, since log parsing is deferred that has little overhead and avoid parsing the log for a given revision several times. The patchlog data is read from the archive.

previous

Previous namespace revision.

The previous revision in the same version, or None if this revision is a base-0.


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