~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml5.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-14 15:07:33 UTC
  • mto: This revision was merged to the branch mainline in revision 1929.
  • Revision ID: john@arbash-meinel.com-20060814150733-c0c575b760aaba3e
Fix bug #55783
Update XML serializer to properly read/write timezone=0
Add tests for this fact, and move revision serialization tests
to be part of repository implementations

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
                       inventory_sha1 = rev.inventory_sha1,
84
84
                       format='5',
85
85
                       )
86
 
        if rev.timezone:
 
86
        if rev.timezone is not None:
87
87
            root.set('timezone', str(rev.timezone))
88
88
        root.text = '\n'
89
89
        msg = SubElement(root, 'message')
188
188
            rev.parent_ids.append(p.get('revision_id'))
189
189
        self._unpack_revision_properties(elt, rev)
190
190
        v = elt.get('timezone')
191
 
        rev.timezone = v and int(v)
 
191
        if v is None:
 
192
            rev.timezone = 0
 
193
        else:
 
194
            rev.timezone = int(v)
192
195
        rev.message = elt.findtext('message') # text of <message>
193
196
        return rev
194
197