Skip to content
Snippets Groups Projects
  • Raphaël Gomès's avatar
    773d872a
    Move `os.environ` manipulation to pre_cleanup · 773d872a
    Raphaël Gomès authored
    Simply initializing a loader would empty the environment, which can
    cause seemingly unrelated things to break. Moving the environment
    handling to the `pre_cleanup` phase ensures that `cleanup` will also
    be called and the environment will not be left in a broken state.
    
    We also add the `HGRCSKIPREPO` variable that I forgot to add in the
    test environment. This is still needed because the tests invoke
    `hg` directly. We could potentially have a wrapper util that uses a
    context-manager to do the environment manipulation closer to the issue,
    but we'd have to make sure that no other bare `hg` invocations can
    happen, even in random subprocesses.
    773d872a
    History
    Move `os.environ` manipulation to pre_cleanup
    Raphaël Gomès authored
    Simply initializing a loader would empty the environment, which can
    cause seemingly unrelated things to break. Moving the environment
    handling to the `pre_cleanup` phase ensures that `cleanup` will also
    be called and the environment will not be left in a broken state.
    
    We also add the `HGRCSKIPREPO` variable that I forgot to add in the
    test environment. This is still needed because the tests invoke
    `hg` directly. We could potentially have a wrapper util that uses a
    context-manager to do the environment manipulation closer to the issue,
    but we'd have to make sure that no other bare `hg` invocations can
    happen, even in random subprocesses.