Mercurial > hg-stable
changeset 2154:f0e54be92bad
merge with crew.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 28 Apr 2006 14:51:36 -0700 |
parents | 57729c56a23c (current diff) 635653cd73ab (diff) |
children | 628bf85f07ee |
files | |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Apr 28 21:52:08 2006 +0200 +++ b/mercurial/commands.py Fri Apr 28 14:51:36 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:
--- a/mercurial/util.py Fri Apr 28 21:52:08 2006 +0200 +++ b/mercurial/util.py Fri Apr 28 14:51:36 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')