~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

  • Committer: Martin Pool
  • Date: 2009-08-06 05:09:41 UTC
  • mto: This revision was merged to the branch mainline in revision 4599.
  • Revision ID: mbp@sourcefrog.net-20090806050941-99h4rbeopcw7pyrl
has_filename should be in CommonInventory and CHKInventory

Show diffs side-by-side

added added

removed removed

Lines of Context:
743
743
        """
744
744
        return self.has_id(file_id)
745
745
 
 
746
    def has_filename(self, filename):
 
747
        return bool(self.path2id(filename))
 
748
 
746
749
    def id2path(self, file_id):
747
750
        """Return as a string the path to file_id.
748
751
 
1363
1366
            yield ie
1364
1367
            file_id = ie.parent_id
1365
1368
 
1366
 
    def has_filename(self, filename):
1367
 
        return bool(self.path2id(filename))
1368
 
 
1369
1369
    def has_id(self, file_id):
1370
1370
        return (file_id in self._byid)
1371
1371