Gregory Szorc <gregory.sz...@gmail.com> writes: > On Fri, Feb 3, 2017 at 12:40 AM, Denis Laxalde <denis.laxa...@logilab.fr> > wrote: > >> Gregory Szorc a écrit : >> >>> # HG changeset patch >>> # User Gregory Szorc <gregory.sz...@gmail.com> >>> # Date 1486108530 28800 >>> # Thu Feb 02 23:55:30 2017 -0800 >>> # Node ID 5fe78521b9cb553b9a7c6bd4d96576a35b8d3517 >>> # Parent abf029200e198878a4576a87e095bd8d77d9cea9 >>> contrib: script to generate release notes from commit messages >>> >> >> [snip] >> >> >> diff --git a/tests/test-generate-release-notes.t >>> b/tests/test-generate-release-notes.t >>> new file mode 100644 >>> --- /dev/null >>> +++ b/tests/test-generate-release-notes.t >>> @@ -0,0 +1,145 @@ >>> +Create a fake repo with a relnotes directory and commits >>> + >>> + $ hg init repo0 >>> + $ export FAKESRCDIR=$TESTTMP/repo0 >>> + $ cd repo0 >>> + $ mkdir relnotes >>> + $ touch relnotes/4.1.rst >>> + $ hg commit -A -m 'add relnotes 4.1' >>> + adding relnotes/4.1.rst >>> + >>> +4.1.rst should be used for relnotes if only available file >>> + >>> + $ $TESTDIR/../contrib/generate-release-notes >>> + updating $TESTTMP/repo0/relnotes/4.1.rst with content from 1 >>> changesets >>> + >>> +4.1.1.rst is used over 4.1.rst >>> + >>> + $ touch relnotes/4.1.1.rst >>> + $ hg commit -A -m 'add relnotes 4.1.1' >>> + adding relnotes/4.1.1.rst >>> + $ $TESTDIR/../contrib/generate-release-notes >>> + updating $TESTTMP/repo0/relnotes/4.1.1.rst with content from 2 >>> changesets >>> + >>> +4.2 is used over 4.1.1 >>> + >>> + $ touch relnotes/4.2.rst >>> + $ hg commit -A -m 'add relnotes 4.2' >>> + adding relnotes/4.2.rst >>> + $ $TESTDIR/../contrib/generate-release-notes >>> + updating $TESTTMP/repo0/relnotes/4.2.rst with content from 3 >>> changesets >>> + >>> +A fix with a single line is documented with .. fix:: >>> + >>> + $ touch fix1 >>> + $ hg commit -A -l - << EOF >>> + > summary line >>> + > >>> + > .. fix:: >>> + > >>> + > this is a simple fix with a single line >>> + > EOF >>> >> >> I looks strange to have an rst block body that is not indented. Typically >> this is not valid rst as the "fix" directive has no content block here. So >> maybe we should consider indentation? That would also make it possible to >> have more text after a directive like: >> >> .. fix:: >> >> this is a simple fix with a single line >> >> more content not to be part of the release notes. >> > > Yes, that is a good suggestion. It also makes the parser simpler since you > can just look for indented lines. > > I'd still like positive feedback from others before I finish this patch: I > don't want to sink more time in it before there is buy-in to this approach.
I like the idea of using mailing list (as a review of text) + commit message but as Sid mentioned, we will still need to copy/edit. It's inevitable since we're human. So, as a source of text, the commit message makes sense. But how will we solve copy editing? _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel