/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/workingtree.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:
451
451
    def has_filename(self, filename):
452
452
        return osutils.lexists(self.abspath(filename))
453
453
 
454
 
    def get_file(self, file_id):
455
 
        file_id = osutils.safe_file_id(file_id)
456
 
        return self.get_file_byname(self.id2path(file_id))
 
454
    def get_file(self, file_id, path=None):
 
455
        if path is None:
 
456
            file_id = osutils.safe_file_id(file_id)
 
457
            path = self.id2path(file_id)
 
458
        return self.get_file_byname(path)
457
459
 
458
460
    def get_file_text(self, file_id):
459
461
        file_id = osutils.safe_file_id(file_id)