changeset 40235:a7cdd81f191b

releasenotes: fix remaining bytes/unicode issues caught by tests All tests now pass. Differential Revision: https://phab.mercurial-scm.org/D5054
author Augie Fackler <augie@google.com>
date Sat, 13 Oct 2018 04:00:47 -0400
parents 3fc2ef49959c
children 9b3470dd9870
files hgext/releasenotes.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/releasenotes.py	Sat Oct 13 03:27:21 2018 -0400
+++ b/hgext/releasenotes.py	Sat Oct 13 04:00:47 2018 -0400
@@ -16,7 +16,6 @@
 import difflib
 import errno
 import re
-import sys
 import textwrap
 
 from mercurial.i18n import _
@@ -55,7 +54,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 +630,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()