/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 tools/generate_release_notes.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 19:09:26 UTC
  • mfrom: (6622.1.36 breezy)
  • Revision ID: jelmer@jelmer.uk-20170521190926-5vtz8xaf0e9ylrpc
Merge rename to breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
"""Generate doc/en/release-notes/index.txt from the per-series NEWS files.
20
20
 
21
21
NEWS files are kept in doc/en/release-notes/, one file per series, e.g.
22
 
doc/en/release-notes/bzr-2.3.txt
 
22
doc/en/release-notes/brz-2.3.txt
23
23
"""
24
24
 
25
 
# XXX: add test_source test that latest doc/en/release-notes/bzr-*.txt has the
 
25
# XXX: add test_source test that latest doc/en/release-notes/brz-*.txt has the
26
26
# NEWS file-id (so that merges of new work will tend to always land new NEWS
27
27
# entries in the latest series).
28
28
 
61
61
    
62
62
    e.g. 1.10b1 will sort as greater than 1.2::
63
63
 
64
 
        >>> natural_sort_key('bzr-1.10b1.txt') > natural_sort_key('bzr-1.2.txt')
 
64
        >>> natural_sort_key('brz-1.10b1.txt') > natural_sort_key('brz-1.2.txt')
65
65
        True
66
66
    """
67
67
    file_name = os.path.basename(file_name)
91
91
        lines = f.readlines()
92
92
    finally:
93
93
        f.close()
94
 
    title = os.path.basename(news_file_name)[len('bzr-'):-len('.txt')]
 
94
    title = os.path.basename(news_file_name)[len('brz-'):-len('.txt')]
95
95
    for line in lines:
96
96
        if line == '####################\n':
97
97
            line = '#' * len(title) + '\n'