# HG changeset patch # User Rishabh Madan # Date 2018-03-03 18:45:35 # Node ID 3fff6f30bd7ff961efbc1e16ef95ba221d3bcfef # Parent 658ed9c7442b791b8584e6b0683a4489aef0bec7 releasenotes: mention changeset with warning and abort Output the changeset hash with the warning/abort message just to know where things messed up. Differential Revision: https://phab.mercurial-scm.org/D2253 diff --git a/hgext/releasenotes.py b/hgext/releasenotes.py --- a/hgext/releasenotes.py +++ b/hgext/releasenotes.py @@ -311,8 +311,8 @@ def parsenotesfromrevisions(repo, direct title = block['lines'][0].strip() if block['lines'] else None if i + 1 == len(blocks): - raise error.Abort(_('release notes directive %s lacks content') - % directive) + raise error.Abort(_('changeset %s: release notes directive %s ' + 'lacks content') % (ctx, directive)) # Now search ahead and find all paragraphs attached to this # admonition. @@ -325,8 +325,8 @@ def parsenotesfromrevisions(repo, direct continue if pblock['type'] != 'paragraph': - repo.ui.warn(_('unexpected block in release notes ' - 'directive %s\n') % directive) + repo.ui.warn(_('changeset %s: unexpected block in release ' + 'notes directive %s\n') % (ctx, directive)) if pblock['indent'] > 0: paragraphs.append(pblock['lines']) diff --git a/tests/test-releasenotes-parsing.t b/tests/test-releasenotes-parsing.t --- a/tests/test-releasenotes-parsing.t +++ b/tests/test-releasenotes-parsing.t @@ -193,7 +193,7 @@ Warn user in case of unexpected block wh > EOF $ hg releasenote -r . - unexpected block in release notes directive feature + changeset a4251905c440: unexpected block in release notes directive feature New Features ============