~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Jelmer Vernooij
  • Date: 2011-04-17 23:06:22 UTC
  • mto: This revision was merged to the branch mainline in revision 5803.
  • Revision ID: jelmer@samba.org-20110417230622-e52xsel9m0t0umcf
Add a RevisionTree.get_file_revision() method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1636
1636
    def annotate_iter(self, file_id,
1637
1637
                      default_revision=_mod_revision.CURRENT_REVISION):
1638
1638
        """See Tree.annotate_iter"""
1639
 
        text_key = (file_id, self.inventory[file_id].revision)
 
1639
        text_key = (file_id, self.get_file_revision(file_id))
1640
1640
        annotations = self._repository.texts.annotate(text_key)
1641
1641
        return [(key[-1], line) for (key, line) in annotations]
1642
1642
 
1806
1806
            return parent_details[1]
1807
1807
        return None
1808
1808
 
 
1809
    @needs_read_lock
 
1810
    def get_file_revision(self, file_id):
 
1811
        return self.inventory[file_id].revision
 
1812
 
1809
1813
    def get_file(self, file_id, path=None):
1810
1814
        return StringIO(self.get_file_text(file_id))
1811
1815