/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/treebuilder.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-20 14:51:03 UTC
  • mfrom: (0.8.23 version_info)
  • mto: This revision was merged to the branch mainline in revision 2028.
  • Revision ID: john@arbash-meinel.com-20060920145103-02725c6d6c886040
[merge] version-info plugin, and cleanup for layout in bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    def __init__(self):
32
32
        """Construct a TreeBuilder."""
33
33
        self._tree = None
34
 
        self._root_done = False
35
34
 
36
35
    def build(self, recipe):
37
36
        """Build recipe into the current tree.
41
40
            '/' then a directory is added, otherwise a regular file is added.
42
41
        """
43
42
        self._ensure_building()
44
 
        if not self._root_done:
45
 
            self._tree.add('', 'root-id', 'directory')
46
 
            self._root_done = True
47
43
        for name in recipe:
48
44
            assert isinstance(name, basestring)
49
45
            if name[-1] == '/':
77
73
            raise errors.AlreadyBuilding
78
74
        self._tree = tree
79
75
        self._tree.lock_tree_write()
 
76