~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remotebranch.py

  • Committer: Martin Pool
  • Date: 2005-09-05 09:27:11 UTC
  • Revision ID: mbp@sourcefrog.net-20050905092711-f9f5bded3fd82605
- more disentangling of xml storage format from objects

- remove pack_xml and unpack_xml function in favor of 
  serializer object

- test unpacking canned revision xml

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
 
156
156
    def get_revision(self, revision_id):
157
157
        from bzrlib.revision import Revision
158
 
        from bzrlib.xml import unpack_xml
159
158
        try:
160
159
            revf = self.revision_store[revision_id]
161
160
        except KeyError:
162
161
            raise NoSuchRevision(self, revision_id)
163
 
        r = unpack_xml(Revision, revf)
 
162
        r = serializer_v4.read_revision(revf)
164
163
        if r.revision_id != revision_id:
165
164
            raise BzrCheckError('revision stored as {%s} actually contains {%s}'
166
165
                                % (revision_id, r.revision_id))