~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Martin Pool
  • Date: 2007-03-05 03:55:31 UTC
  • mto: (2255.2.180 subtree)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: mbp@sourcefrog.net-20070305035531-1t1wn6oy526vrb0q
Tree.id2path should raise NoSuchId, not return None.

Add tree implementation test for this and update WorkingTree_4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
        return iter(self.inventory)
147
147
 
148
148
    def id2path(self, file_id):
 
149
        """Return the path for a file id.
 
150
 
 
151
        :raises NoSuchId:
 
152
        """
149
153
        file_id = osutils.safe_file_id(file_id)
150
154
        return self.inventory.id2path(file_id)
151
155