/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/memorytree.py

  • Committer: Ian Clatworthy
  • Date: 2007-08-23 00:12:35 UTC
  • mto: (2772.2.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 2774.
  • Revision ID: ian.clatworthy@internode.on.net-20070823001235-bjza31s3c5ffdxlj
Skip path lookup for tree.get_file() when we already know the path

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
        missing files, so is a no-op.
80
80
        """
81
81
 
82
 
    def get_file(self, file_id):
 
82
    def get_file(self, file_id, path=None):
83
83
        """See Tree.get_file."""
84
 
        return self._file_transport.get(self.id2path(file_id))
 
84
        if path is None:
 
85
            path = self.id2path(file_id)
 
86
        return self._file_transport.get(path)
85
87
 
86
88
    def get_file_sha1(self, file_id, path=None, stat_value=None):
87
89
        """See Tree.get_file_sha1()."""