~debian-bazaar/debian/sid/loggerhead/unstable

« back to all changes in this revision

Viewing changes to loggerhead/history.py

  • Committer: Jelmer Vernooij
  • Date: 2020-06-08 11:52:43 UTC
  • mfrom: (182.150.78)
  • Revision ID: jelmer@jelmer.uk-20200608115243-93mj8a4sqxr37nk3
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
773
773
        changes = self.get_file_changes(entry)
774
774
        entry.changes = changes
775
775
 
776
 
    def get_file(self, file_id, revid):
 
776
    def get_file(self, path, revid):
777
777
        """Returns (path, filename, file contents)"""
778
 
        if not isinstance(file_id, bytes):
779
 
            raise TypeError(file_id)
 
778
        if not isinstance(path, str):
 
779
            raise TypeError(path)
780
780
        if not isinstance(revid, bytes):
781
781
            raise TypeError(revid)
782
782
        rev_tree = self._branch.repository.revision_tree(revid)
783
 
        path = rev_tree.id2path(file_id)
784
783
        display_path = path
785
784
        if not display_path.startswith('/'):
786
785
            path = '/' + path