D2253: releasenotes: mention changeset with warning and abort

rishabhmadan96 (Rishabh Madan) phabricator at mercurial-scm.org
Wed Feb 14 07:31:01 UTC 2018


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

REVISION SUMMARY
  Output the changeset hash with the warning/abort message just to know where things messed up.

REPOSITORY
  rHG Mercurial

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

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
@@ -311,8 +311,8 @@
             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') % (node.hex(ctx.node()), directive))
 
             # Now search ahead and find all paragraphs attached to this
             # admonition.
@@ -325,8 +325,8 @@
                     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') % (node.hex(ctx.node()), directive))
 
                 if pblock['indent'] > 0:
                     paragraphs.append(pblock['lines'])



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


More information about the Mercurial-devel mailing list