Skip to content
Snippets Groups Projects
  • Matt Harbison's avatar
    6ec2e133
    windows: stop enabling legacy stdio by default in the `hg` executable · 6ec2e133
    Matt Harbison authored
    We need to stop doing this in order to exercize the new code in the previous
    commit.  The environment variable can still be manually set to revert to the
    previous state of things that has been used since py3 support was added, for
    now.  We should try to get away from it entirely though, because this problem
    affects more than what is written up in issue6952.[1]
    
    I've tested locally with the `hg.exe` form of this, and the tests pass.  That
    gives me some hope, but 1) the pager wouldn't typically be used in tests due to
    the runner capturing the output, unless a pager is explicitly requested (like a
    few tests do), and 2) the tests are basically all ascii characters anyway, so
    that's kind of hard to screw up.  (The test runner sets `HGENCODING=ascii`, I
    assume for portability, so that's unlikely to change.  I've also managed to
    generate corrupt file names when trying to write a test for an issue with
    non-ascii file names[2], using code that works perfectly fine outside the test
    runner.  But we do seem to be getting the output that was previously missing,
    and the project CI system will cover `hg.bat` when it tests the wheels.)
    
    [1] mercurial/tortoisehg/thg#5854
    [2] mercurial/tortoisehg/thg#5923
    6ec2e133
    History
    windows: stop enabling legacy stdio by default in the `hg` executable
    Matt Harbison authored
    We need to stop doing this in order to exercize the new code in the previous
    commit.  The environment variable can still be manually set to revert to the
    previous state of things that has been used since py3 support was added, for
    now.  We should try to get away from it entirely though, because this problem
    affects more than what is written up in issue6952.[1]
    
    I've tested locally with the `hg.exe` form of this, and the tests pass.  That
    gives me some hope, but 1) the pager wouldn't typically be used in tests due to
    the runner capturing the output, unless a pager is explicitly requested (like a
    few tests do), and 2) the tests are basically all ascii characters anyway, so
    that's kind of hard to screw up.  (The test runner sets `HGENCODING=ascii`, I
    assume for portability, so that's unlikely to change.  I've also managed to
    generate corrupt file names when trying to write a test for an issue with
    non-ascii file names[2], using code that works perfectly fine outside the test
    runner.  But we do seem to be getting the output that was previously missing,
    and the project CI system will cover `hg.bat` when it tests the wheels.)
    
    [1] mercurial/tortoisehg/thg#5854
    [2] mercurial/tortoisehg/thg#5923