This is an archive of the discontinued Mercurial Phabricator instance.

cmdutil: add a missing byte prefix to string introduce in 976b26bdd0d8
ClosedPublic

Authored by marmoute on Feb 9 2021, 6:11 PM.

Details

Summary

The change is missing a the b'foo' prefix to make it a bytestring. This lead
to a traceback in some third party extension. It is unclear to me why the
Mercurial test pass without it.

Diff Detail

Repository
rHG Mercurial
Branch
stable
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

marmoute created this revision.Feb 9 2021, 6:11 PM
martinvonz accepted this revision.Feb 9 2021, 8:15 PM
martinvonz added a subscriber: martinvonz.

Thanks.

It is unclear to me why the Mercurial test pass without it.

I think _() converts to bytes.

This revision is now accepted and ready to land.Feb 9 2021, 8:15 PM

Thanks.

It is unclear to me why the Mercurial test pass without it.

I think _() converts to bytes.

I think that’s conditional on HGPLAIN *not* being set, which I think the test runner does set. I was having issues a few months ago because some test-check-* tests use the system installed hg and config, which loaded the keyring extension, which has similar byteification needs. I was initially puzzled why it only crashed when running tests, and that conditional turned out to be why.