~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

[merge] robert

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
    def id2path(self, file_id):
72
72
        return self.inventory.id2path(file_id)
73
73
 
 
74
    def kind(self, file_id):
 
75
        raise NotImplementedError("subclasses must implement kind")
 
76
 
74
77
    def _get_inventory(self):
75
78
        return self._inventory
76
79
    
182
185
    def kind(self, file_id):
183
186
        return self._inventory[file_id].kind
184
187
 
 
188
 
185
189
class EmptyTree(Tree):
186
190
    def __init__(self):
187
191
        self._inventory = Inventory()
192
196
    def has_filename(self, filename):
193
197
        return False
194
198
 
 
199
    def kind(self, file_id):
 
200
        assert self._inventory[file_id].kind == "root_directory"
 
201
        return "root_directory"
 
202
 
195
203
    def list_files(self):
196
204
        return iter([])
197
205