bitprophet / releases

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

Support "only backported so far" for bugfix/backported issues #17

Closed bitprophet closed 10 years ago

bitprophet commented 10 years ago

Scenario:

Solutions:

bitprophet commented 10 years ago

Got this implemented for bugs, then when trying it out in Fabric's changelog promptly realized I'm an idiot; the problem here is that I want one specific bug backported & all the other bugs to be not backported (as far).

So even though the gateway bug going back to 1.5 is the 'uncommon' case, the way I thought about this was the inverse. With this as-is I'd need to mark almost all bugs with e.g. 1.7 or 1.8 to prevent them from showing up in a 1.5.x release. I actually mentioned this above but somehow glossed over/forgot about it in the counterargument.

Also - noticed that it looks fugly as is, e.g. (n.b. using :bg not 'bug' because github emoji) :bg:\23 1.7- all numbers, hard to scan in a way that e.g.`:bg:`23 backportedis not. What'd be better is e.g.:bg:23 limit=1.7``, but that makes "add it to every bug" even worse.


Is there a good way to encode the "default" behavior I've been assuming? Not really - best I can think of is to do the obvious and allow decorating the release itself as being "special" and containing specific bugs. E.g. as-is, in the below 1.1.1 and 1.0.2 would both include bugs 2, 3 and 4:

* :release:`1.1.1 <date>`
* :release:`1.0.2 <date>`
* :bg:`4` yup
* :bg:`3` one moar
* :bg:`2` another boog
* :release:`1.1.0 <date>`
* :bg:`1` a boog
* :release:`1.0.0 <date>`

Could use simple comma/whitespace separation after release (esp given that while bugs have "stuff" after them, we currently ignore anything after release roles - so we can fill it in in a backwards compat fashion):

* :release:`1.1.1 <date>`
* :release:`1.0.2 <date>` 2, 3
* :bg:`4`
* :bg:`3`
* :bg:`2`
* :release:`1.1.0 <date>`
* :bg:`1`
* :release:`1.0.0 <date>`

In the above, we're explicitly saying release 1.0.2 includes bugs 2 and 3 only. Bug 4 is therefore skipped. I think this will work? Gonna give it a shot.

bitprophet commented 10 years ago

Have tests for this working, albeit kinda fugly and in need of some cleanup/consolidation. And expansion for edge cases, probably just skip()'d for now.

Next is to test back on Fabric and see how it works in real world usage.

bitprophet commented 10 years ago

Got it working!