D1097: releasenotes: don't abort is there is a bad formatted entry for releasenotes

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sun Oct 15 15:15:10 UTC 2017


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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 status message which will help us in skipping them and telling user
  about it.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1097

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
@@ -24,6 +24,7 @@
     config,
     error,
     minirst,
+    node,
     registrar,
     scmutil,
     util,
@@ -323,9 +324,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.status(_("error parsing releasenotes for revision: "
+                                 "'%s'\n") % node.hex(ctx.node()))
             if title:
                 notes.addtitleditem(directive, title, paragraphs)
             else:



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list