~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Aaron Bentley
  • Date: 2008-10-12 15:38:00 UTC
  • mto: This revision was merged to the branch mainline in revision 3803.
  • Revision ID: aaron@aaronbentley.com-20081012153800-8ff72bdslnbknfdi
Test Tree.get_file_lines, provide a default implementation

Show diffs side-by-side

added added

removed removed

Lines of Context:
277
277
        finally:
278
278
            my_file.close()
279
279
 
 
280
    def get_file_lines(self, file_id, path=None):
 
281
        """Return the content of a file, as lines.
 
282
 
 
283
        :param file_id: The file_id of the file.
 
284
        :param path: The path of the file.
 
285
        If both file_id and path are supplied, an implementation may use
 
286
        either one.
 
287
 
 
288
        osutils.split_lines is always used, rather than calling file.readlines,
 
289
        because the behavior of file.readlines may differ by platform.
 
290
        """
 
291
        return osutils.split_lines(self.get_file_text(file_id, path))
 
292
 
280
293
    def get_file_mtime(self, file_id, path=None):
281
294
        """Return the modification time for a file.
282
295