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. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel