/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to tools/generate_release_notes.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

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'