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

  • Committer: Aaron Bentley
  • Date: 2007-02-06 14:52:16 UTC
  • mfrom: (2266 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2268.
  • Revision ID: abentley@panoramicfeedback.com-20070206145216-fcpi8o3ufvuzwbp9
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        self._repository = branch
41
41
        self._weave_store = branch.weave_store
42
42
        self._inventory = inv
43
 
        assert inv.root is not None
44
43
        self._revision_id = revision_id
45
44
 
46
45
    def get_parent_ids(self):
74
73
    def get_file(self, file_id):
75
74
        return StringIO(self.get_file_text(file_id))
76
75
 
 
76
    def annotate_iter(self, file_id):
 
77
        """See Tree.annotate_iter"""
 
78
        w = self.get_weave(file_id)
 
79
        return w.annotate_iter(self.inventory[file_id].revision)
 
80
 
77
81
    def get_file_size(self, file_id):
78
82
        return self._inventory[file_id].text_size
79
83
 
80
 
    def get_file_sha1(self, file_id, path=None):
 
84
    def get_file_sha1(self, file_id, path=None, stat_value=None):
81
85
        ie = self._inventory[file_id]
82
86
        if ie.kind == "file":
83
87
            return ie.text_sha1
100
104
    def list_files(self, include_root=False):
101
105
        # The only files returned by this are those from the version
102
106
        entries = self.inventory.iter_entries()
103
 
        if not include_root:
 
107
        # skip the root for compatability with the current apis.
 
108
        if self.inventory.root is not None and not include_root:
104
109
            # skip the root for compatability with the current apis.
105
110
            entries.next()
106
111
        for path, entry in entries:
113
118
    def kind(self, file_id):
114
119
        return self._inventory[file_id].kind
115
120
 
 
121
    def _comparison_data(self, entry, path):
 
122
        if entry is None:
 
123
            return None, False, None
 
124
        return entry.kind, entry.executable, None
 
125
 
 
126
    def _file_size(self, entry, stat_value):
 
127
        assert entry.text_size is not None
 
128
        return entry.text_size
 
129
 
116
130
    def lock_read(self):
117
131
        self._repository.lock_read()
118
132