##// END OF EJS Templates
revlog: make sure we never use sparserevlog without general delta (issue6056)...
revlog: make sure we never use sparserevlog without general delta (issue6056) We are getting user report where the delta code tries to use `sparse-revlog` logic on repository where `generaldelta` is disabled. This can't work so we ensure the two booleans have a consistent value. Creating this kind of repository is not expected to be possible the current bug report point at a clonebundle related bug that is still to be properly isolated (Yuya Nishihara seems to a have done it). Corrupting a repository to reproduce the issue is possible. A test using this method is included in this fix.

File last commit:

r40072:acf5dbe3 default
r41525:189e06b2 stable
Show More
showstack.py
28 lines | 731 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)
"""dump stack trace when receiving SIGQUIT (Ctrl-\) and SIGINFO (Ctrl-T on BSDs)
"""
from __future__ import absolute_import, print_function
import signal
import sys
import traceback
def sigshow(*args):
sys.stderr.write("\n")
traceback.print_stack(args[1], limit=10, file=sys.stderr)
sys.stderr.write("----\n")
def sigexit(*args):
sigshow(*args)
print('alarm!')
sys.exit(1)
def extsetup(ui):
signal.signal(signal.SIGQUIT, sigshow)
signal.signal(signal.SIGALRM, sigexit)
try:
signal.signal(signal.SIGINFO, sigshow)
except AttributeError:
pass