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

  • Committer: Kent Gibson
  • Date: 2007-03-07 14:49:00 UTC
  • mfrom: (2324 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2350.
  • Revision ID: warthog618@gmail.com-20070307144900-6bt7twg47zul3w0w
merged bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
_utf8_encode = codecs.getencoder("utf-8")
26
26
_utf8_decode = codecs.getdecoder("utf-8")
 
27
# wrap _utf8_decode to support None->None for optional strings.
 
28
def _utf8_decode_with_None(bytestring, _utf8_decode=_utf8_decode):
 
29
    if bytestring is None:
 
30
        return (None, 0)
 
31
    else:
 
32
        return _utf8_decode(bytestring)
27
33
 
28
34
# Map revisions from and to utf8 encoding
29
35
# Whenever we do an encode/decode operation, we save the result, so that