# HG changeset patch # User Vadim Gelfer # Date 1146261023 25200 # Node ID 635653cd73aba71ec9e7b05ec4cb19c6f2132087 # Parent 0ce3cd330996e49ac3292aac4bfa4d4cd3f0a47a move SignalInterrupt class into util module. diff -r 0ce3cd330996 -r 635653cd73ab mercurial/commands.py --- a/mercurial/commands.py Fri Apr 28 12:38:11 2006 +0200 +++ b/mercurial/commands.py Fri Apr 28 14:50:23 2006 -0700 @@ -3260,11 +3260,8 @@ 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 @@ (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 -r 0ce3cd330996 -r 635653cd73ab mercurial/util.py --- a/mercurial/util.py Fri Apr 28 12:38:11 2006 +0200 +++ b/mercurial/util.py Fri Apr 28 14:50:23 2006 -0700 @@ -16,6 +16,9 @@ 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')