/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Andrew Bennetts
  • Date: 2008-10-29 21:39:27 UTC
  • mfrom: (3806 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3814.
  • Revision ID: andrew.bennetts@canonical.com-20081029213927-w349uqh8ya8293xv
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
        """
265
265
        raise NotImplementedError(self.get_file)
266
266
 
 
267
    def get_file_text(self, file_id, path=None):
 
268
        """Return the byte content of a file.
 
269
 
 
270
        :param file_id: The file_id of the file.
 
271
        :param path: The path of the file.
 
272
        If both file_id and path are supplied, an implementation may use
 
273
        either one.
 
274
        """
 
275
        my_file = self.get_file(file_id, path)
 
276
        try:
 
277
            return my_file.read()
 
278
        finally:
 
279
            my_file.close()
 
280
 
 
281
    def get_file_lines(self, file_id, path=None):
 
282
        """Return the content of a file, as lines.
 
283
 
 
284
        :param file_id: The file_id of the file.
 
285
        :param path: The path of the file.
 
286
        If both file_id and path are supplied, an implementation may use
 
287
        either one.
 
288
        """
 
289
        return osutils.split_lines(self.get_file_text(file_id, path))
 
290
 
267
291
    def get_file_mtime(self, file_id, path=None):
268
292
        """Return the modification time for a file.
269
293