bitprophet / releases

A powerful Sphinx changelog-generating extension.
http://releases.readthedocs.io/
BSD 2-Clause "Simplified" License
176 stars 41 forks source link

Consider expanding 'unreleased XXX' display #62

Open bitprophet opened 7 years ago

bitprophet commented 7 years ago

When poking around exposing a parsed changelog programmatically (so folks could e.g. figure out whether the changelog needs updating with a release entry at release time) I realized there's data left in the line manager which we don't expose in the finally published changelog.

For example, consider a project with multiple active bugfix lines, say a 1.10 and 1.11, and assume most/all bugs are backported to 1.10.

When it comes time to release, one will go back to 1.10, add a release line to the changelog (and tag and publish and etc etc). At that point in time, everything's great - all bugs are in the new 1.10 release (say 1.10.5), no bugs are in 'unreleased 1.x bugfix', etc.

Now switch to the 1.11 branch, and merge in the 1.10 branch. Problem: even though no 1.11 release line is in the changelog, the 'unreleased 1.x bugfix' "release" is still empty/nonexistent when you render/parse the changelog - because those bugs are now in a release (1.10.5). Even though, from the perspective of 1.11, they are still outstanding/pending/etc.

Now, the internal LineManager object knows this - its [1]['1.11'] release-line bucket is non-empty at end of run. And if one adds an eg 1.11.3 release line, it empties that bucket as one would expect. But we're never exposing that bucket to the rendered changelog.


What this means: