The subprocess call (which should have been using run) uses the -u
bash option, which stops the script at the first sight of an unset
variable... but also doesn't set the variable expected by the very
We also reset the environment so that the hg script is not influenced by
user configuration, which was a second source of breakage.