# HG changeset patch # User Vadim Gelfer # Date 1146261096 25200 # Node ID f0e54be92bad80a60c3be7622c0a1762e3306107 # Parent 57729c56a23cf614bf3fef6ad54b5a95e4408f60# Parent 635653cd73aba71ec9e7b05ec4cb19c6f2132087 merge with crew. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3260,11 +3260,8 @@ def find(cmd): raise UnknownCommand(cmd) -class SignalInterrupt(Exception): - """Exception raised on SIGTERM and SIGHUP.""" - def catchterm(*args): - raise SignalInterrupt + raise util.SignalInterrupt def run(): sys.exit(dispatch(sys.argv[1:])) @@ -3464,7 +3461,7 @@ def dispatch(args): (inst.desc or inst.filename, inst.strerror)) except revlog.RevlogError, inst: u.warn(_("abort: "), inst, "!\n") - except SignalInterrupt: + except util.SignalInterrupt: u.warn(_("killed!\n")) except KeyboardInterrupt: try: diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -16,6 +16,9 @@ from demandload import * demandload(globals(), "cStringIO errno popen2 re shutil sys tempfile") demandload(globals(), "threading time") +class SignalInterrupt(Exception): + """Exception raised on SIGTERM and SIGHUP.""" + def pipefilter(s, cmd): '''filter string S through command CMD, returning its output''' (pout, pin) = popen2.popen2(cmd, -1, 'b')