releasenotes: don't abort is there is a bad formatted entry for releasenotes
While producing releasenotes for (4.3::), releasenotes aborts with error because
of some bad formatting of releasenotes in some commits. Instead of aborting,
this adds warning message which will help us in skipping them and telling user
about it.
Differential Revision: https://phab.mercurial-scm.org/D1097
--- a/hgext/releasenotes.py Sun Oct 15 20:29:16 2017 +0530
+++ b/hgext/releasenotes.py Sun Oct 15 20:31:44 2017 +0530
@@ -24,6 +24,7 @@
config,
error,
minirst,
+ node,
registrar,
scmutil,
util,
@@ -325,9 +326,8 @@
# TODO consider using title as paragraph for more concise notes.
if not paragraphs:
- raise error.Abort(_('could not find content for release note '
- '%s') % directive)
-
+ repo.ui.warn(_("error parsing releasenotes for revision: "
+ "'%s'\n") % node.hex(ctx.node()))
if title:
notes.addtitleditem(directive, title, paragraphs)
else: