~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

Added Transform docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
 
38
38
 
39
39
class TreeTransform(object):
40
 
    """Represent a tree transformation."""
 
40
    """Represent a tree transformation.
 
41
    
 
42
    This object is designed to support incremental generation of the transform,
 
43
    in any order.  
 
44
    
 
45
    It is easy to produce malformed transforms, but they are generally
 
46
    harmless.  Attempting to apply a malformed transform will cause an
 
47
    exception to be raised before any modifications are made to the tree.  
 
48
 
 
49
    Many kinds of malformed transforms can be corrected with the 
 
50
    resolve_conflicts function.  The remaining ones indicate programming error,
 
51
    such as trying to create a file with no path.
 
52
 
 
53
    Two sets of file creation methods are supplied.  Convenience methods are:
 
54
     * new_file
 
55
     * new_directory
 
56
     * new_symlink
 
57
 
 
58
    These are composed of the low-level methods:
 
59
     * create_path
 
60
     * create_file or create_directory or create_symlink
 
61
     * version_file
 
62
     * set_executability
 
63
    """
41
64
    def __init__(self, tree):
42
65
        """Note: a write lock is taken on the tree.
43
66