# HG changeset patch # User Adrian Buehlmann # Date 2011-05-06 13:41:04 # Node ID 4d684d8210a186f857e06d60b21c18efebc67afa # Parent e949a008999d684ccad7c3590ca603fc7b4655fb rename util.set_signal_handler to setsignalhandler diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3756,7 +3756,7 @@ def serve(ui, repo, **opts): class service(object): def init(self): - util.set_signal_handler() + util.setsignalhandler() self.httpd = hgweb.server.create_server(ui, app) if opts['port'] and not ui.verbose: diff --git a/mercurial/posix.py b/mercurial/posix.py --- a/mercurial/posix.py +++ b/mercurial/posix.py @@ -244,7 +244,7 @@ def find_exe(command): return executable return None -def set_signal_handler(): +def setsignalhandler(): pass def statfiles(files): diff --git a/mercurial/win32.py b/mercurial/win32.py --- a/mercurial/win32.py +++ b/mercurial/win32.py @@ -239,9 +239,9 @@ def getuser(): return buf.value _SIGNAL_HANDLER = ctypes.WINFUNCTYPE(_BOOL, _DWORD) -_signal_handler = [] +_signalhandler = [] -def set_signal_handler(): +def setsignalhandler(): '''Register a termination handler for console events including CTRL+C. python signal handlers do not work well with socket operations. @@ -249,10 +249,10 @@ def set_signal_handler(): def handler(event): _kernel32.ExitProcess(1) - if _signal_handler: + if _signalhandler: return # already registered h = _SIGNAL_HANDLER(handler) - _signal_handler.append(h) # needed to prevent garbage collection + _signalhandler.append(h) # needed to prevent garbage collection if not _kernel32.SetConsoleCtrlHandler(h, True): raise ctypes.WinError()