Skip to content
  • Matt Harbison's avatar
    Byteify registered command help and the `buglink` attribute · 4a2d0ce50f5a
    Matt Harbison authored
    I hit this in various test-check-* tests for Mercurial when running on a zstd
    repo without the C extensions, but this can be trivially reproduced with
    `HGPLAIN=1`:
    
        *** failed to import extension mercurial_keyring: unicode 'keyring_check [PATH]' found in cmdtable.keyring_check
        *** (use b'' to make it byte string)
    
    The issue is that `i18n._()` wants bytes, but leaves a backdoor for `str` for
    docstrings.  That backdoor is closed if `HGPLAIN` or `HGPLAINEXCEPT` is set
    (unless `i18n` is set in `HGPLAINEXCEPT`).  There are a bunch of other uses of
    this function that still need to be byteified.
    
    The global `buglink`, `testedwith`, and `minimumhgversion` also want to be
    bytes.
    4a2d0ce50f5a