D10203: crecord: convert an instance of bytes to str
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Sat Mar 13 19:33:41 UTC 2021
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
Caught by pytype:
File "/mnt/c/Users/Matt/hg/mercurial/crecord.py", line 1154, in printstring: Function _CursesWindow.addstr was called with the wrong arguments [wrong-arg-types]
Expected: (self, str: str, ...)
Actually passed: (self, str: bytes, ...)
REPOSITORY
rHG Mercurial
BRANCH
stable
REVISION DETAIL
https://phab.mercurial-scm.org/D10203
AFFECTED FILES
mercurial/crecord.py
CHANGE DETAILS
diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -1152,7 +1152,7 @@
numtrailingspaces = origlen - strippedlen
if towin:
- window.addstr(text, colorpair)
+ window.addstr(encoding.strfromlocal(text), colorpair)
t += text
if showwhtspc:
To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list