##// END OF EJS Templates
contrib: add a hint if the Windows dependency MSI is already installed...
contrib: add a hint if the Windows dependency MSI is already installed In the past, I've gotten confused when the script failed on seemingly random python installs (and thus the py3.8 install was commented out from the last time this happened to me, which has been reverted here). This particular error code means the package was already installed. For python, it means the major and minor version are the same, but the micro version may differ. In practice, ignoring the python installation failure will cause the pip installation that happens next to fail, because python.exe for that version is somewhere else on the system. This could probably be fixed by running py.exe with the major and minor version, but that is skipped during the install for some reason. I didn't feel like over complicating this though, and at least there's a better hint when the problem occurs. Differential Revision: https://phab.mercurial-scm.org/D12560

File last commit:

r49730:6000f5b2 default
r49955:246ee748 default
Show More
showstack.py
30 lines | 679 B | text/x-python | PythonLexer
Matt Mackall
contrib: add showstack extension...
r26123 # showstack.py - extension to dump a Python stack trace on signal
#
# binds to both SIGQUIT (Ctrl-\) and SIGINFO (Ctrl-T on BSDs)
Gregory Szorc
showstack: use raw docstring...
r41689 r"""dump stack trace when receiving SIGQUIT (Ctrl-\) or SIGINFO (Ctrl-T on BSDs)
Boris Feld
showstack: add an extension docstring...
r35674 """
Matt Mackall
contrib: add showstack extension...
r26123
Pulkit Goyal
showstack: use absolute_import
r28522 import signal
import sys
import traceback
Matt Mackall
contrib: add showstack extension...
r26123
Augie Fackler
formatting: blacken the codebase...
r43346
Matt Mackall
contrib: add showstack extension...
r26123 def sigshow(*args):
sys.stderr.write("\n")
traceback.print_stack(args[1], limit=10, file=sys.stderr)
sys.stderr.write("----\n")
Augie Fackler
formatting: blacken the codebase...
r43346
Augie Fackler
showstack: also handle SIGALRM...
r40072 def sigexit(*args):
sigshow(*args)
print('alarm!')
sys.exit(1)
Augie Fackler
formatting: blacken the codebase...
r43346
Matt Mackall
contrib: add showstack extension...
r26123 def extsetup(ui):
signal.signal(signal.SIGQUIT, sigshow)
Augie Fackler
showstack: also handle SIGALRM...
r40072 signal.signal(signal.SIGALRM, sigexit)
Matt Mackall
contrib: add showstack extension...
r26123 try:
signal.signal(signal.SIGINFO, sigshow)
except AttributeError:
pass