PBR

Escape changelog RST

Bug #1499519 reported by Joshua Harlow
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PBR
Fix Released
Undecided
Unassigned

Bug Description

Some changelogs generated (and then included in say sphinx) can cause sphinx to error out when including the changelog.

It might be nice to escape rst-syntax in changelogs (so they can be included without issue) in generated docs.

For example: from oslo.versionedobjects changelog

    * Fixes up Bucket to throw proper NotFound and NotEmpty exceptions in constructor and delete() method, and fixes up objectstore_unittest to properly use assertRaises() to check for proper exceptions and remove the assert_ calls

This entry (which is just any other commit message) has a line for 'assert_'

When included via sphinx, this causes sphinx to try to find a reference to 'assert_'

When building:

```
reading sources... [ 70%] history
reading sources... [100%] usage
ChangeLog:1845: WARNING: Inline emphasis start-string without end-string.
ChangeLog:3167: ERROR: Unknown target name: "assert".
ChangeLog:3172: ERROR: Unknown target name: "assert".
looking for now-outdated files... none found

```

Instead if the changelog could support rst-escaping (optionally?) that would be super and avoid these types of errors/issues.

Joshua Harlow (harlowja)
description: updated
Revision history for this message
Wes Turner (wes-turner) wrote :

Here's a potential rst_escape function:

- https://github.com/westurner/dotfiles/blob/e866c630952/scripts/git-changelog.py

A separate package with a comprehensive test suite might be good.

Extracted, this function could be part of docutils?

Revision history for this message
Stephen Finucane (stephenfinucane) wrote :
Changed in pbr:
status: New → Incomplete
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.