~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: John Arbash Meinel
  • Date: 2006-04-27 15:14:36 UTC
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: john@arbash-meinel.com-20060427151436-eb8c2328f7ea15f3
Repository had a bug with what exception was raised when a file was missing

Show diffs side-by-side

added added

removed removed

Lines of Context:
536
536
        # use inventory as it was in that revision
537
537
        file_id = tree.inventory.path2id(file)
538
538
        if not file_id:
539
 
            raise BzrError("%r is not present in revision %s" % (file, revno))
540
 
            try:
541
 
                revno = self.revision_id_to_revno(revision_id)
542
 
            except errors.NoSuchRevision:
543
 
                # TODO: This should not be BzrError,
544
 
                # but NoSuchFile doesn't fit either
545
 
                raise BzrError('%r is not present in revision %s' 
546
 
                                % (file, revision_id))
547
 
            else:
548
 
                raise BzrError('%r is not present in revision %s'
549
 
                                % (file, revno))
 
539
            # TODO: jam 20060427 Write a test for this code path
 
540
            #       it had a bug in it, and was raising the wrong
 
541
            #       exception.
 
542
            raise errors.BzrError("%r is not present in revision %s" % (file, revision_id))
550
543
        tree.print_file(file_id)
551
544
 
552
545
    def get_transaction(self):