~jelmer/brz/python3-d

« back to all changes in this revision

Viewing changes to breezy/bzr/chk_serializer.py

  • Committer: Jelmer Vernooij
  • Date: 2018-06-15 13:10:28 UTC
  • Revision ID: jelmer@jelmer.uk-20180615131028-abolpmqrid8th0cd
More bees.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
    # the type.
68
68
    # TODO: add a 'validate_utf8' for things like revision_id and file_id
69
69
    #       and a validator for parent-ids
70
 
    _schema = {'format': (None, int, _is_format_10),
71
 
               'committer': ('committer', str, cache_utf8.decode),
72
 
               'timezone': ('timezone', int, None),
73
 
               'timestamp': ('timestamp', str, float),
74
 
               'revision-id': ('revision_id', str, None),
75
 
               'parent-ids': ('parent_ids', list, None),
76
 
               'inventory-sha1': ('inventory_sha1', str, None),
77
 
               'message': ('message', str, cache_utf8.decode),
78
 
               'properties': ('properties', dict, _validate_properties),
 
70
    _schema = {b'format': (None, int, _is_format_10),
 
71
               b'committer': ('committer', bytes, cache_utf8.decode),
 
72
               b'timezone': ('timezone', int, None),
 
73
               b'timestamp': ('timestamp', bytes, float),
 
74
               b'revision-id': ('revision_id', bytes, None),
 
75
               b'parent-ids': ('parent_ids', list, None),
 
76
               b'inventory-sha1': ('inventory_sha1', bytes, None),
 
77
               b'message': ('message', bytes, cache_utf8.decode),
 
78
               b'properties': ('properties', dict, _validate_properties),
79
79
    }
80
80
 
81
81
    def write_revision_to_string(self, rev):