diff --git a/releasenotes/notes/show-note-filename-in-report-a1118c917588b58d.yaml b/releasenotes/notes/show-note-filename-in-report-a1118c917588b58d.yaml new file mode 100644 index 0000000..286b754 --- /dev/null +++ b/releasenotes/notes/show-note-filename-in-report-a1118c917588b58d.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + The report output now includes debugging details with the filename + and sha for the version of the content used to indicate where the + content is from to assist with debugging formatting or content + issues. diff --git a/reno/formatter.py b/reno/formatter.py index aebe6f2..b6d43ec 100644 --- a/reno/formatter.py +++ b/reno/formatter.py @@ -49,12 +49,13 @@ def format_report(loader, config, versions_to_include, title=None): notefiles = loader[version] for n, sha in notefiles: if 'prelude' in file_contents[n]: + report.append('.. %s @ %s\n' % (n, sha)) report.append(file_contents[n]['prelude']) report.append('') for section_name, section_title in config.sections: notes = [ - n + (n, fn, sha) for fn, sha in notefiles if file_contents[fn].get(section_name) for n in file_contents[fn].get(section_name, []) @@ -63,7 +64,8 @@ def format_report(loader, config, versions_to_include, title=None): report.append(section_title) report.append('-' * len(section_title)) report.append('') - for n in notes: + for n, fn, sha in notes: + report.append('.. %s @ %s\n' % (fn, sha)) report.append('- %s' % _indent_for_list(n)) report.append('')