/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/cache_utf8.py

  • Committer: Jelmer Vernooij
  • Date: 2019-03-04 00:16:27 UTC
  • mfrom: (7293 work)
  • mto: This revision was merged to the branch mainline in revision 7318.
  • Revision ID: jelmer@jelmer.uk-20190304001627-v6u7o6pf97tukhek
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
_utf8_encode = codecs.utf_8_encode
27
27
_utf8_decode = codecs.utf_8_decode
 
28
 
 
29
 
28
30
def _utf8_decode_with_None(bytestring, _utf8_decode=_utf8_decode):
29
31
    """wrap _utf8_decode to support None->None for optional strings.
30
32
 
36
38
    else:
37
39
        return _utf8_decode(bytestring)[0]
38
40
 
 
41
 
39
42
# Map revisions from and to utf8 encoding
40
43
# Whenever we do an encode/decode operation, we save the result, so that
41
44
# we don't have to do it again.