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

  • Committer: Jelmer Vernooij
  • Date: 2018-11-16 19:47:19 UTC
  • mfrom: (7178 work)
  • mto: This revision was merged to the branch mainline in revision 7179.
  • Revision ID: jelmer@jelmer.uk-20181116194719-m5ut2wfuze5x9s1p
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
# XXX: some redundancy is allowing to write stanzas in isolation as well as
44
44
# through a writer object.
45
45
 
 
46
 
46
47
class RioWriter(object):
47
48
 
48
49
    def __init__(self, to_file):
62
63
    to_file can be anything that can be enumerated as a sequence of
63
64
    lines (with newlines.)
64
65
    """
 
66
 
65
67
    def __init__(self, from_file):
66
68
        self._from_file = from_file
67
69
 
348
350
 
349
351
def _patch_stanza_iter(line_iter):
350
352
    map = {b'\\\\': b'\\',
351
 
           b'\\r' : b'\r',
 
353
           b'\\r': b'\r',
352
354
           b'\\\n': b''}
 
355
 
353
356
    def mapget(match):
354
357
        return map[match.group(0)]
355
358
 
397
400
except ImportError as e:
398
401
    osutils.failed_to_load_extension(e)
399
402
    from ._rio_py import (
400
 
       _read_stanza_utf8,
401
 
       _read_stanza_unicode,
402
 
       _valid_tag,
403
 
       )
 
403
        _read_stanza_utf8,
 
404
        _read_stanza_unicode,
 
405
        _valid_tag,
 
406
        )