/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 breezy/chk_serializer.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-10 00:06:46 UTC
  • mfrom: (6673 work)
  • mto: This revision was merged to the branch mainline in revision 6675.
  • Revision ID: jelmer@jelmer.uk-20170610000646-xj6jh277lo4xuo10
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
def _validate_properties(props, _decode=cache_utf8._utf8_decode):
42
42
    # TODO: we really want an 'isascii' check for key
43
43
    # Cast the utf8 properties into Unicode 'in place'
44
 
    for key, value in props.iteritems():
 
44
    for key, value in props.items():
45
45
        props[key] = _decode(value)[0]
46
46
    return props
47
47
 
90
90
        # For bzr revisions, the most common property is just 'branch-nick'
91
91
        # which changes infrequently.
92
92
        revprops = {}
93
 
        for key, value in rev.properties.iteritems():
 
93
        for key, value in rev.properties.items():
94
94
            revprops[key] = encode_utf8(value)[0]
95
95
        ret.append(('properties', revprops))
96
96
        ret.extend([
131
131
                value = validator(value)
132
132
            bits[var_name] = value
133
133
        if len(bits) != len(schema):
134
 
            missing = [key for key, (var_name, _, _) in schema.iteritems()
 
134
            missing = [key for key, (var_name, _, _) in schema.items()
135
135
                       if var_name not in bits]
136
136
            raise ValueError('Revision text was missing expected keys %s.'
137
137
                             ' text %r' % (missing, text))