/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Martin Pool
  • Date: 2005-08-02 23:29:53 UTC
  • Revision ID: mbp@sourcefrog.net-20050802232953-007bdd0af7ffa4c2
- better error message when failing to get revision from store

Show diffs side-by-side

added added

removed removed

Lines of Context:
593
593
 
594
594
 
595
595
    def get_revision_xml(self, revision_id):
596
 
        """Return XML string for revision object."""
 
596
        """Return XML file object for revision object."""
597
597
        if not revision_id or not isinstance(revision_id, basestring):
598
598
            raise InvalidRevisionId(revision_id)
599
599
 
609
609
 
610
610
    def get_revision(self, revision_id):
611
611
        """Return the Revision object for a named revision"""
612
 
        r = unpack_xml(Revision, self.get_revision_xml(revision_id))
 
612
        xml_file = self.get_revision_xml(revision_id)
 
613
 
 
614
        try:
 
615
            r = unpack_xml(Revision, xml_file)
 
616
        except SyntaxError, e:
 
617
            raise bzrlib.errors.BzrError('failed to unpack revision_xml',
 
618
                                         [revision_id,
 
619
                                          str(e)])
613
620
            
614
621
        assert r.revision_id == revision_id
615
622
        return r