##// END OF EJS Templates
parsers: suppress warning of signed and unsigned comparison at nt_init...
parsers: suppress warning of signed and unsigned comparison at nt_init Spotted by CC=clang CFLAGS='-Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wshorten-64-to-32': mercurial/parsers.c:1580:24: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare] if (self->raw_length > INT_MAX / sizeof(nodetree)) {

File last commit:

r26123:bdac264e default
r26775:3c259710 default
Show More
showstack.py
17 lines | 460 B | text/x-python | PythonLexer
# showstack.py - extension to dump a Python stack trace on signal
#
# binds to both SIGQUIT (Ctrl-\) and SIGINFO (Ctrl-T on BSDs)
import sys, signal, traceback
def sigshow(*args):
sys.stderr.write("\n")
traceback.print_stack(args[1], limit=10, file=sys.stderr)
sys.stderr.write("----\n")
def extsetup(ui):
signal.signal(signal.SIGQUIT, sigshow)
try:
signal.signal(signal.SIGINFO, sigshow)
except AttributeError:
pass