D2254: releasenotes: allow notes for multiple directives in a single changeset
This revision was automatically updated to reflect the committed changes. Closed by commit rHGa5891e94bfe1: releasenotes: allow notes for multiple directives in a single changeset (authored by rishabhmadan96, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2254?vs=6592=6695 REVISION DETAIL https://phab.mercurial-scm.org/D2254 AFFECTED FILES hgext/releasenotes.py tests/test-releasenotes-formatting.t CHANGE DETAILS 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 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)) To: rishabhmadan96, #hg-reviewers, durin42 Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D2254: releasenotes: allow notes for multiple directives in a single changeset
rishabhmadan96 updated this revision to Diff 6592. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2254?vs=5694=6592 REVISION DETAIL https://phab.mercurial-scm.org/D2254 AFFECTED FILES hgext/releasenotes.py tests/test-releasenotes-formatting.t CHANGE DETAILS 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 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)) To: rishabhmadan96, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D2254: releasenotes: allow notes for multiple directives in a single changeset
pulkit added a comment. Can you add tests showing what the new behavior is? The correct behavior should be to include multiple directives in the notes correctly. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2254 To: rishabhmadan96, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D2254: releasenotes: allow notes for multiple directives in a single changeset
rishabhmadan96 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This problem was caught in https://phab.mercurial-scm.org/rHGda91e7309daf8ffc51bf3e6f4b2d8a16ef5af95a. This patch just makes sure there is no warning when we encounter such a case. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2254 AFFECTED FILES hgext/releasenotes.py CHANGE DETAILS 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') % (node.hex(ctx.node()), directive)) To: rishabhmadan96, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel