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

Class Changeset

source code

object --+                
         |                
basestring --+            
             |            
           str --+        
                 |        
 pathname.PathName --+    
                     |    
      pathname.DirName --+
                         |
                        Changeset

Arch whole-tree changeset.



Instance Methods
 
__init__(self, name)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
apply(self, tree, reverse=False)
Apply this changeset to a tree.
 
created_file(self, name)
 
get_index(self, name, all=False)
Load and parse an index file from the changeset.
 
iter_apply(self, tree, reverse=False)
Apply this changeset to a tree, with incremental output.
 
iter_created_dirs(self, all=False)
Iterator over tuples (id, dest) for created directories.
 
iter_created_files(self, all=False)
Iterator over tuples (id, dest) for created files.
 
iter_mod_files(self, all=False)
Iterator over (id, orig, mod) tuples for files which are are patched, renamed, or have their permissions changed.
 
iter_patched_files(self, all=False)
Iterate over (id, orig, mod) of patched files.
 
iter_removed_dirs(self, all=False)
Iterator over tuples (id, orig) for removed directories.
 
iter_removed_files(self, all=False)
Iterator over tuples (id, orig) for removed files.
 
iter_renames(self)
Iterate over (id, orig, dest) triples representing renames.
 
patch_file(self, modname)
 
removed_file(self, name)

Inherited from pathname.PathName: __div__, __repr__, abspath, basename, dirname, realpath, splitname

Inherited from str: __add__, __contains__, __eq__, __ge__, __getattribute__, __getitem__, __getnewargs__, __getslice__, __gt__, __hash__, __le__, __len__, __lt__, __mod__, __mul__, __ne__, __rmod__, __rmul__, __str__, capitalize, center, count, decode, encode, endswith, expandtabs, find, index, isalnum, isalpha, isdigit, islower, isspace, istitle, isupper, join, ljust, lower, lstrip, partition, replace, rfind, rindex, rjust, rpartition, rsplit, rstrip, split, splitlines, startswith, strip, swapcase, title, translate, upper, zfill

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__

Static Methods

Inherited from pathname.PathName: __new__

Properties
  does_nothing
Is the changeset a no-op?

Inherited from object: __class__

Method Details

__init__(self, name)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

apply(self, tree, reverse=False)

 
Apply this changeset to a tree. Raise on conflict.

:param tree: the tree to apply changes to.
:type tree: `WorkingTree`
:param reverse: invert the meaning of the changeset; adds
    become deletes, etc.
:type reverse: bool
:raise errors.ChangesetConflict: a conflict occured while applying the
    changeset.

get_index(self, name, all=False)

 
Load and parse an index file from the changeset.

Expectable indexes are:
mod-dirs mod-files orig-dirs orig-files (more?)

iter_apply(self, tree, reverse=False)

 
Apply this changeset to a tree, with incremental output.

:param tree: the tree to apply changes to.
:type tree: `WorkingTree`
:param reverse: invert the meaning of the changeset; adds
    become deletes, etc.
:type reverse: bool
:rtype: `ChangesetApplication`

iter_created_dirs(self, all=False)

 
Iterator over tuples (id, dest) for created directories.

:param all: include Arch control files.
:type all: bool

iter_created_files(self, all=False)

 
Iterator over tuples (id, dest) for created files.

:param all: include Arch control files.
:type all: bool

iter_removed_dirs(self, all=False)

 
Iterator over tuples (id, orig) for removed directories.

:param all: include Arch control files.
:type all: bool

iter_removed_files(self, all=False)

 
Iterator over tuples (id, orig) for removed files.

:param all: include Arch control files.
:type all: bool

iter_renames(self)

 
Iterate over (id, orig, dest) triples representing renames.

id is the persistant file tag, and the key of the dictionnary.
orig is the name in the original tree.
dest is the name in the modified tree.


Property Details

does_nothing

Is the changeset a no-op?

Get Method:
pybaz.Changeset._get_does_nothing(self) - Is the changeset a no-op?