~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

Allow compare_trees to list root

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
    def has_filename(self, filename):
177
177
        return bool(self.inventory.path2id(filename))
178
178
 
179
 
    def list_files(self):
 
179
    def list_files(self, include_root=False):
 
180
        if self.inventory.root is not None and include_root:
 
181
            yield ('', 'V', 'directory', self.inventory.root.file_id,
 
182
                   self.inventory.root)
180
183
        # The only files returned by this are those from the version
181
184
        for path, entry in self.inventory.iter_entries():
182
185
            yield path, 'V', entry.kind, entry.file_id, entry
205
208
    def has_filename(self, filename):
206
209
        return False
207
210
 
208
 
    def list_files(self):
 
211
    def list_files(self, include_root=False):
209
212
        return iter([])
210
213
    
211
214
    def __contains__(self, file_id):