~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: John Arbash Meinel
  • Date: 2006-05-27 08:19:40 UTC
  • mto: (1711.2.26 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1734.
  • Revision ID: john@arbash-meinel.com-20060527081940-b9b872d50743430b
If you have the path, use it rather than looking it up again

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
    def get_file_size(self, file_id):
158
158
        return self._inventory[file_id].text_size
159
159
 
160
 
    def get_file_sha1(self, file_id):
 
160
    def get_file_sha1(self, file_id, path=None):
161
161
        ie = self._inventory[file_id]
162
162
        if ie.kind == "file":
163
163
            return ie.text_sha1
 
164
        return None
164
165
 
165
 
    def is_executable(self, file_id):
 
166
    def is_executable(self, file_id, path=None):
166
167
        ie = self._inventory[file_id]
167
168
        if ie.kind != "file":
168
169
            return None 
210
211
    def __contains__(self, file_id):
211
212
        return file_id in self._inventory
212
213
 
213
 
    def get_file_sha1(self, file_id):
 
214
    def get_file_sha1(self, file_id, path=None):
214
215
        assert self._inventory[file_id].kind == "root_directory"
215
216
        return None
216
217