~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Robert Collins
  • Date: 2005-10-17 11:56:54 UTC
  • mfrom: (1185.16.59)
  • Revision ID: robertc@robertcollins.net-20051017115654-662239e1587524a8
mergeĀ fromĀ martin.

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
 
 
77
74
    def _get_inventory(self):
78
75
        return self._inventory
79
76
    
185
182
    def kind(self, file_id):
186
183
        return self._inventory[file_id].kind
187
184
 
188
 
 
189
185
class EmptyTree(Tree):
190
186
    def __init__(self):
191
187
        self._inventory = Inventory()
196
192
    def has_filename(self, filename):
197
193
        return False
198
194
 
199
 
    def kind(self, file_id):
200
 
        assert self._inventory[file_id].kind == "root_directory"
201
 
        return "root_directory"
202
 
 
203
195
    def list_files(self):
204
196
        return iter([])
205
197