~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Ian Clatworthy
  • Date: 2007-08-31 05:54:21 UTC
  • mfrom: (2743.3.6 bzr.quicker-initial-commit)
  • mto: This revision was merged to the branch mainline in revision 2774.
  • Revision ID: ian.clatworthy@internode.on.net-20070831055421-iwcem9phv1needkk
(Ian Clatworthy) Quicker initial commit - skip SHAing twice & skip path lookup as we know it

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)