/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/plugins/news_merge/parser.py

  • Committer: Marius Kruger
  • Date: 2010-07-10 21:28:56 UTC
  • mto: (5384.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5385.
  • Revision ID: marius.kruger@enerweb.co.za-20100710212856-uq4ji3go0u5se7hx
* Update documentation
* add NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
simple_parse's docstring).
25
25
"""
26
26
 
27
 
from __future__ import absolute_import
28
 
 
29
27
 
30
28
def simple_parse_lines(lines):
31
29
    """Same as simple_parse, but takes an iterable of strs rather than a single
36
34
 
37
35
def simple_parse(content):
38
36
    """Returns blocks, where each block is a 2-tuple (kind, text).
39
 
 
 
37
    
40
38
    :kind: one of 'heading', 'release', 'section', 'empty' or 'text'.
41
39
    :text: a str, including newlines.
42
40
    """
68
66
    import sys
69
67
    content = open(sys.argv[1], 'rb').read()
70
68
    for result in simple_parse(content):
71
 
        print(result)
 
69
        print result