/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 breezy/revisiontree.py

  • Committer: Jelmer Vernooij
  • Date: 2017-11-19 18:35:20 UTC
  • mfrom: (6809.4.27 swap-arguments)
  • Revision ID: jelmer@jelmer.uk-20171119183520-fmw89uw30e0tbhwz
Merge lp:~jelmer/brz/swap-arguments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
        """Return the revision id associated with this tree."""
65
65
        return self._revision_id
66
66
 
67
 
    def get_file_revision(self, file_id, path=None):
 
67
    def get_file_revision(self, path, file_id=None):
68
68
        """Return the revision id in which a file was last changed."""
69
69
        raise NotImplementedError(self.get_file_revision)
70
70
 
71
 
    def get_file_text(self, file_id, path=None):
 
71
    def get_file_text(self, path, file_id=None):
 
72
        if file_id is None:
 
73
            file_id = self.path2id(path)
72
74
        for (identifier, content) in self.iter_files_bytes([(file_id, None)]):
73
75
            ret = "".join(content)
74
76
        return ret
75
77
 
76
 
    def get_file(self, file_id, path=None):
77
 
        return BytesIO(self.get_file_text(file_id))
 
78
    def get_file(self, path, file_id=None):
 
79
        return BytesIO(self.get_file_text(path, file_id))
78
80
 
79
81
    def is_locked(self):
80
82
        return self._repository.is_locked()