Patchwork D2255: releasenotes: replace abort with warning while parsing

login
register
mail settings
Submitter phabricator
Date Feb. 14, 2018, 7:31 a.m.
Message ID <differential-rev-PHID-DREV-hhasqhfziowtiy4ajscw-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27889/
State Superseded
Headers show

Comments

phabricator - Feb. 14, 2018, 7:31 a.m.
rishabhmadan96 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  During the 4.5 development cycle, the extension broke on two different changesets. This change
  simply makes sure that it just throws a warning when encounters something instead of an abort
  action.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/releasenotes.py

CHANGE DETAILS




To: rishabhmadan96, #hg-reviewers
Cc: mercurial-devel
phabricator - Feb. 14, 2018, 10:01 a.m.
pulkit added a comment.


  This one is a bugfix, so please add the issue number in the commit message. Also add related tests as that will help make sure we don't encounter such problems again in future.

REPOSITORY
  rHG Mercurial

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

To: rishabhmadan96, #hg-reviewers
Cc: pulkit, mercurial-devel
phabricator - Feb. 14, 2018, 12:34 p.m.
rishabhmadan96 added a comment.


  Yeah, my bad. I'll send an updated version with the suggested changes.

REPOSITORY
  rHG Mercurial

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

To: rishabhmadan96, #hg-reviewers
Cc: pulkit, mercurial-devel
phabricator - March 4, 2018, 4 p.m.
durin42 added a comment.


  Friendly ping - should I expect an updated version of this series?

REPOSITORY
  rHG Mercurial

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

To: rishabhmadan96, #hg-reviewers
Cc: durin42, pulkit, mercurial-devel
phabricator - March 4, 2018, 6:28 p.m.
rishabhmadan96 added a comment.


  I totally forgot about this. I'll send them right away.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/hgext/releasenotes.py b/hgext/releasenotes.py
--- a/hgext/releasenotes.py
+++ b/hgext/releasenotes.py
@@ -325,8 +325,8 @@ 
                     continue
 
                 if pblock['type'] != 'paragraph':
-                    raise error.Abort(_('unexpected block in release notes '
-                                        'directive %s') % directive)
+                    repo.ui.warn(_('unexpected block in release notes '
+                                        'directive %s\n') % directive)
 
                 if pblock['indent'] > 0:
                     paragraphs.append(pblock['lines'])