~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: abentley
  • Date: 2005-10-14 04:32:24 UTC
  • mto: (1185.25.1)
  • mto: This revision was merged to the branch mainline in revision 1460.
  • Revision ID: abentley@lappy-20051014043224-347635f0e1fbc673
Propogated has_or_had_id to Tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
        return self.abspath(self.id2path(file_id))
157
157
 
158
158
                
159
 
    def has_id(self, file_id, allow_root=False):
 
159
    def has_id(self, file_id):
160
160
        # files that have been deleted are excluded
161
 
        inv = self.inventory
162
 
        if allow_root and file_id == inv.root.file_id:
163
 
            return True
 
161
        inv = self._inventory
164
162
        if not inv.has_id(file_id):
165
163
            return False
166
164
        path = inv.id2path(file_id)
167
165
        return bzrlib.osutils.lexists(self.abspath(path))
168
166
 
 
167
    def has_or_had_id(self, file_id):
 
168
        if file_id == self.inventory.root.file_id:
 
169
            return True
 
170
        return self.inventory.has_id(file_id)
169
171
 
170
172
    __contains__ = has_id
171
173