~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Aaron Bentley
  • Date: 2006-06-03 16:23:09 UTC
  • mfrom: (1736 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: aaron.bentley@utoronto.ca-20060603162309-c975ca9ea9fea344
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from bzrlib.trace import mutter, note
25
25
from bzrlib.errors import BzrError, BzrCheckError
26
26
from bzrlib.inventory import Inventory
27
 
from bzrlib.osutils import appendpath, fingerprint_file
 
27
from bzrlib.osutils import fingerprint_file
28
28
 
29
29
class Tree(object):
30
30
    """Abstract file tree.
161
161
    def get_file_size(self, file_id):
162
162
        return self._inventory[file_id].text_size
163
163
 
164
 
    def get_file_sha1(self, file_id):
 
164
    def get_file_sha1(self, file_id, path=None):
165
165
        ie = self._inventory[file_id]
166
166
        if ie.kind == "file":
167
167
            return ie.text_sha1
 
168
        return None
168
169
 
169
 
    def is_executable(self, file_id):
 
170
    def is_executable(self, file_id, path=None):
170
171
        ie = self._inventory[file_id]
171
172
        if ie.kind != "file":
172
173
            return None 
214
215
    def __contains__(self, file_id):
215
216
        return file_id in self._inventory
216
217
 
217
 
    def get_file_sha1(self, file_id):
 
218
    def get_file_sha1(self, file_id, path=None):
218
219
        assert self._inventory[file_id].kind == "root_directory"
219
220
        return None
220
221