diff --git a/hgext/releasenotes.py b/hgext/releasenotes.py --- a/hgext/releasenotes.py +++ b/hgext/releasenotes.py @@ -324,6 +324,9 @@ if pblock['type'] == 'margin': continue + if pblock['type'] == 'admonition': + break + if pblock['type'] != 'paragraph': repo.ui.warn(_('changeset %s: unexpected block in release ' 'notes directive %s\n') % (ctx, directive)) diff --git a/tests/test-releasenotes-formatting.t b/tests/test-releasenotes-formatting.t --- a/tests/test-releasenotes-formatting.t +++ b/tests/test-releasenotes-formatting.t @@ -457,3 +457,35 @@ ------------------ First paragraph of fix 1. + + $ cd .. + +Using multiple admonitions in same changeset + + $ hg init relnotes-multiadmon + $ cd relnotes-multiadmon + + $ touch file1 + $ hg -q commit -A -l - << EOF + > commit 1 + > + > .. feature:: + > + > Details about new feature. + > + > .. perf:: + > + > Improves the execution by 2x + > EOF + + $ hg releasenotes -r . $TESTTMP/relnotes-multiple-admonitions + $ cat $TESTTMP/relnotes-multiple-admonitions + New Features + ============ + + * Details about new feature. + + Performance Improvements + ======================== + + * Improves the execution by 2x