D5054: releasenotes: fix remaining bytes/unicode issues caught by tests

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Sat Oct 13 08:01:58 UTC 2018


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

REVISION SUMMARY
  All tests now pass.

REPOSITORY
  rHG Mercurial

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

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
@@ -55,7 +55,7 @@
 ]
 
 RE_DIRECTIVE = re.compile('^\.\. ([a-zA-Z0-9_]+)::\s*([^$]+)?$')
-RE_ISSUE = r'\bissue ?[0-9]{4,6}(?![0-9])\b'
+RE_ISSUE =  br'\bissue ?[0-9]{4,6}(?![0-9])\b'
 
 BULLET_SECTION = _('Other Changes')
 
@@ -631,7 +631,7 @@
 def debugparsereleasenotes(ui, path, repo=None):
     """parse release notes and print resulting data structure"""
     if path == '-':
-        text = sys.stdin.read()
+        text = pycompat.stdin.read()
     else:
         with open(path, 'rb') as fh:
             text = fh.read()



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


More information about the Mercurial-devel mailing list