Patchwork D2254: releasenotes: allow notes for multiple directives in a single changeset

login
register
mail settings
Submitter phabricator
Date Feb. 14, 2018, 7:31 a.m.
Message ID <differential-rev-PHID-DREV-elbw46arzlrnqzobdpsy-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27888/
State Superseded
Headers show

Comments

phabricator - Feb. 14, 2018, 7:31 a.m.
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




To: rishabhmadan96, #hg-reviewers
Cc: mercurial-devel
phabricator - Feb. 14, 2018, 9:59 a.m.
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

Patch

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))