D2133: py3: replace file() with open() in test-convert-git.t
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Mon Feb 12 05:37:28 EST 2018
yuja added inline comments.
INLINE COMMENTS
> pulkit wrote in test-convert-git.t:423
> To make chr() return bytes, I did chr().encode('latin-1') but there is `UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128) `error while writing to file. Python 2 also don't have the encoding argument to open which Python 3 has. Looks like need to write a .py file and execute that.
Maybe we can steal pycompat.bytechr of py3. It should work on both Pythons.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2133
To: pulkit, #hg-reviewers, yuja
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list