##// END OF EJS Templates
debugshell: allow TortoiseHg builds to exit with the usual `quit()` command...
Matt Harbison -
r50791:88b81dc2 default
parent child Browse files
Show More
@@ -3800,6 +3800,21 b' def debugshell(ui, repo):'
3800 'repo': repo,
3800 'repo': repo,
3801 }
3801 }
3802
3802
3803 # py2exe disables initialization of the site module, which is responsible
3804 # for arranging for ``quit()`` to exit the interpreter. Manually initialize
3805 # the stuff that site normally does here, so that the interpreter can be
3806 # quit in a consistent manner, whether run with pyoxidizer, exewrapper.c,
3807 # py.exe, or py2exe.
3808 if getattr(sys, "frozen", None) == 'console_exe':
3809 try:
3810 import site
3811
3812 site.setcopyright()
3813 site.sethelper()
3814 site.setquit()
3815 except ImportError:
3816 site = None # Keep PyCharm happy
3817
3803 code.interact(local=imported_objects)
3818 code.interact(local=imported_objects)
3804
3819
3805
3820
General Comments 0
You need to be logged in to leave comments. Login now