debugshell: allow TortoiseHg builds to exit with the usual `quit()` command
I've long been annoyed that `quit()` only randomly worked to exit the
interpreter. When that happens, Ctrl+C doesn't work either (it simply prints
"KeyboardInterrupt"), so then you have to `import sys` and `sys.exit()`. But it
turns out that the behavior isn't random and it depended on which `hg.exe` was
picked up on PATH first, because py2exe disables site initialization.
I wasn't able to persuade the maintainer to allow an opt-in to
initialization[1], but this works around it so that the behavior is now
consistent however `hg.exe` is built. TortoiseHg 6.3.3 will be the first build
that includes the site package, so handle the ImportError.
[1] https://github.com/py2exe/py2exe/issues/154
{
"version": 1,
"project": "mercurial",
"project_url": "https://mercurial-scm.org/",
"repo": "..",
"branches": ["default", "stable"],
"environment_type": "virtualenv",
"show_commit_url": "https://www.mercurial-scm.org/repo/hg/rev/",
"benchmark_dir": "benchmarks",
"env_dir": "../.asv/env",
"results_dir": "../.asv/results",
"html_dir": "../.asv/html"
}