# HG changeset patch # User Augie Fackler # Date 1539417647 14400 # Node ID a7cdd81f191bb9ac46ded5f98c0c783446285042 # Parent 3fc2ef49959cefa8b550686a600e696d9926b7c4 releasenotes: fix remaining bytes/unicode issues caught by tests All tests now pass. Differential Revision: https://phab.mercurial-scm.org/D5054 diff -r 3fc2ef49959c -r a7cdd81f191b hgext/releasenotes.py --- 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()