From patchwork Sun Oct 15 15:15:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D1097: releasenotes: don't abort is there is a bad formatted entry for releasenotes From: phabricator X-Patchwork-Id: 24954 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Sun, 15 Oct 2017 15:15:10 +0000 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 To: pulkit, #hg-reviewers Cc: mercurial-devel 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: