~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml5.py

  • Committer: John Arbash Meinel
  • Date: 2007-10-19 17:14:33 UTC
  • mto: This revision was merged to the branch mainline in revision 2924.
  • Revision ID: john@arbash-meinel.com-20071019171433-ko3319eemyhpb7kz
Fix bug #152360. The xml5 serializer should be using
the hint it was given about the revision id.
It was accidentally overwriting the revision_id to None when the
data did not hold a valid value.
Add tests that this is done properly, at both the Repository level
and at the xml5 layer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
348
348
            if format != '5':
349
349
                raise BzrError("invalid format version %r on inventory"
350
350
                                % format)
351
 
        revision_id = elt.get('revision_id')
352
 
        if revision_id is not None:
353
 
            revision_id = cache_utf8.encode(revision_id)
 
351
        data_revision_id = elt.get('revision_id')
 
352
        if data_revision_id is not None:
 
353
            revision_id = cache_utf8.encode(data_revision_id)
354
354
        inv = Inventory(root_id, revision_id=revision_id)
355
355
        for e in elt:
356
356
            ie = self._unpack_entry(e)