~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Andrew Bennetts
  • Date: 2009-06-09 03:14:05 UTC
  • mfrom: (4416 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4420.
  • Revision ID: andrew.bennetts@canonical.com-20090609031405-wak9yogzzpx9o172
Merge bzr.dev, resolving NEWS conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
263
263
        """
264
264
        raise NotImplementedError(self.get_file)
265
265
 
 
266
    def get_file_with_stat(self, file_id, path=None):
 
267
        """Get a file handle and stat object for file_id.
 
268
 
 
269
        The default implementation returns (self.get_file, None) for backwards
 
270
        compatibility.
 
271
 
 
272
        :param file_id: The file id to read.
 
273
        :param path: The path of the file, if it is known.
 
274
        :return: A tuple (file_handle, stat_value_or_None). If the tree has
 
275
            no stat facility, or need for a stat cache feedback during commit,
 
276
            it may return None for the second element of the tuple.
 
277
        """
 
278
        return (self.get_file(file_id, path), None)
 
279
 
266
280
    def get_file_text(self, file_id, path=None):
267
281
        """Return the byte content of a file.
268
282