~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Robert Collins
  • Date: 2005-10-03 02:54:29 UTC
  • mto: (1393.1.30)
  • mto: This revision was merged to the branch mainline in revision 1400.
  • Revision ID: robertc@robertcollins.net-20051003025429-a9a2b4544b48cdd4
push kind character creation into InventoryEntry and TreeEntry

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
    def list_files(self):
162
162
        # The only files returned by this are those from the version
163
163
        for path, entry in self.inventory.iter_entries():
164
 
            yield path, 'V', entry.kind, entry.file_id
 
164
            yield path, 'V', entry.kind, entry.file_id, entry
165
165
 
166
166
    def get_symlink_target(self, file_id):
167
167
        ie = self._inventory[file_id]
168
168
        return ie.symlink_target;
169
169
 
 
170
 
170
171
class EmptyTree(Tree):
171
172
    def __init__(self):
172
173
        self._inventory = Inventory()
178
179
        return False
179
180
 
180
181
    def list_files(self):
181
 
        if False:  # just to make it a generator
182
 
            yield None
 
182
        return iter([])
183
183
    
184
184
    def __contains__(self, file_id):
185
185
        return file_id in self._inventory
189
189
        return None
190
190
 
191
191
 
192
 
 
193
 
 
194
192
######################################################################
195
193
# diff
196
194