/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: 2018-11-17 00:47:52 UTC
  • mfrom: (7182 work)
  • mto: This revision was merged to the branch mainline in revision 7305.
  • Revision ID: jelmer@jelmer.uk-20181117004752-6ywampe5pfywlby4
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
from io import BytesIO
22
22
from . import (
23
 
    errors,
24
23
    lock,
25
24
    revision,
26
25
    tree,
44
43
 
45
44
    def supports_tree_reference(self):
46
45
        return getattr(self._repository._format, "supports_tree_reference",
47
 
            False)
 
46
                       False)
48
47
 
49
48
    def get_parent_ids(self):
50
49
        """See Tree.get_parent_ids.
62
61
        """Return the revision id associated with this tree."""
63
62
        return self._revision_id
64
63
 
65
 
    def get_file_revision(self, path, file_id=None):
 
64
    def get_file_revision(self, path):
66
65
        """Return the revision id in which a file was last changed."""
67
66
        raise NotImplementedError(self.get_file_revision)
68
67
 
69
 
    def get_file_text(self, path, file_id=None):
 
68
    def get_file_text(self, path):
70
69
        for (identifier, content) in self.iter_files_bytes([(path, None)]):
71
70
            ret = b"".join(content)
72
71
        return ret
73
72
 
74
 
    def get_file(self, path, file_id=None):
75
 
        return BytesIO(self.get_file_text(path, file_id))
 
73
    def get_file(self, path):
 
74
        return BytesIO(self.get_file_text(path))
76
75
 
77
76
    def is_locked(self):
78
77
        return self._repository.is_locked()
92
91
        """See Tree._get_rules_searcher."""
93
92
        if self._rules_searcher is None:
94
93
            self._rules_searcher = super(RevisionTree,
95
 
                self)._get_rules_searcher(default_searcher)
 
94
                                         self)._get_rules_searcher(default_searcher)
96
95
        return self._rules_searcher