##// END OF EJS Templates
wix: more robust normalization of RC version components...
wix: more robust normalization of RC version components MSI has strict version requirements where the format is `A.B.C[.D]` and all fields must be numeric (https://docs.microsoft.com/en-us/windows/win32/msi/productversion?redirectedfrom=MSDN). Only the first 3 are used by the installer itself. Mercurial's version strings can have `rcN` and an optional `+<commit>-<date>` fragment at the end. This commit teaches the MSI version normalization to handle both of these more robustly. Before, we would throw away the `.rcN` component completely. e.g. `5.3rc1` would get normalized to `5.3.0`. And worse, `5.3rc0+5-abcdef` would get normalized to `5.3.5`. After this commit, presence of an `.rcN` provides the value for a 4th field. e.g. `5.3rc1` -> `5.3.0.1`. In addition, the commit count from the `+` suffix gets normalized into the 4th version component, but only if the original version string didn't have a 4th version component or if no `rcN` is present. e.g. `5.3+5-abcdef` is `5.3.0.5`. Differential Revision: https://phab.mercurial-scm.org/D8003

File last commit:

r43346:2372284d default
r44632:8d653abe stable
Show More
showstack.py
31 lines | 734 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
Augie Fackler
showstack: also handle SIGALRM...
r40072 from __future__ import absolute_import, print_function
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