D5812: py3: pass str into ValueError to prevent b'' prefix in output
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Sun Feb 3 07:48:24 EST 2019
yuja added a comment.
> I am not whether this is correct. This should have fix failure of `test-lfs-serve.t#lfsremote-on` failure on py3 but it does not.
As you guess, this isn't correct. For example, `_(unicode_sring)` will crash
if gettext is enabled.
I don't know why ValueError is used extensively in exchange.py and where it's
supposed to be caught, but the easiest workaround is to make a ValueError
subclass that implements __bytes__.
class ExchangeValueError(ValueError):
__bytes__ = _tobytes
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5812
To: pulkit, durin42, martinvonz, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list