Zachary Ware added the comment: Here's my half-baked idea on the topic, based largely on what I could learn of Twisted's method from looking through their source repo online. I liked their use of separate files for each NEWS entry, especially since it should make merge conflicts exceedingly rare.
Basically, the plan is to add a couple of scripts to Tools/scripts named news.py and news_release.py. Spec outline for news.py: - four possible usages: - interactive - ask for each necessary datum - issue number(s), section(s), message - single command - command line switches for section and issue number, remaining arguments constitute message - blend - ask about anything not given in the single command, unless told not to with -f/--force (and then use defaults) - invoke editor - mirror hg's handling of `hg commit` without -m or -l, open an editor and use the saved file - output a text file named "issue<number>.<count>.news" or "<current hg rev>+<something random>.news" (default in case of no issue number) containing the message into the appropriate folder(s) (e.g. Misc/NEWS.parts/Build) - print the contents of the written file to stdout - allows `news.py --section build --issue 12345 "Fix building" | hg com -l -` - print the output file's name to stderr - to make it easy to use `hg com -l Misc/NEWS.parts/<filename>.news` and not interfere with the above - `hg add` the output file This would necessitate a bit of new structure in the repo, namely a Misc/NEWS.parts/ dir, containing directories for each section (Core & Builtins, Library, etc.), which should also have a 'header.news' file to make each dir non-empty and for use with news_release.py. This second script would be used at release time, and would simply walk the Misc/NEWS.parts dirs, building Misc/NEWS from the individual files and deleting them as it goes. Beyond this basic functionality, there are other possible extensions, such as news.py gathering any information about the current change that is readily available and saving it in either comments at the tail end of the generated .news file, or in a separate .data file with the same base name, which news_release.py could then use for alternate NEWS formats (such as suitable output for Doc/whatsnew/changelog.rst with links to anything relevant). To make the usage more convenient, both scripts could be added to Makefile, a la `make patchcheck`. For Windows committers, there can either be a convenience batch file just for news.py, or I still hope to eventually get configure.bat/make.bat into a committable state. If anyone thinks this half-baked idea looks like it might be edible when it's done, I'd be happy to cobble together news.py and news_release.py in a sandbox repo. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18967> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com