Patchwork D2253: releasenotes: mention changeset with warning and abort

login
register
mail settings
Submitter phabricator
Date March 4, 2018, 7:17 p.m.
Message ID <90e539c2e13f7d88145dcc536d03126b@localhost.localdomain>
Download mbox | patch
Permalink /patch/28968/
State Not Applicable
Headers show

Comments

phabricator - March 4, 2018, 7:17 p.m.
rishabhmadan96 updated this revision to Diff 6591.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2253?vs=5693&id=6591

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

AFFECTED FILES
  hgext/releasenotes.py
  tests/test-releasenotes-parsing.t

CHANGE DETAILS




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

Patch

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 @@ 
   > EOF
 
   $ hg releasenote -r .
-  unexpected block in release notes directive feature
+  changeset a4251905c440: unexpected block in release notes directive feature
   New Features
   ============
   
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') % (ctx, 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') % (ctx, directive))
 
                 if pblock['indent'] > 0:
                     paragraphs.append(pblock['lines'])