# HG changeset patch # User Augie Fackler # Date 2018-10-13 08:00:47 # 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 --git a/hgext/releasenotes.py b/hgext/releasenotes.py --- a/hgext/releasenotes.py +++ b/hgext/releasenotes.py @@ -16,7 +16,6 @@ from __future__ import absolute_import import difflib import errno import re -import sys import textwrap from mercurial.i18n import _ @@ -55,7 +54,7 @@ DEFAULT_SECTIONS = [ ] 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 releasenotes(ui, repo, file_=None, * 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()