##// END OF EJS Templates
dispatch: take over SignalInterrupt handling from scmutil...
Jun Wu -
r32111:1208b748 default
parent child Browse files
Show More
@@ -162,9 +162,13 b' def dispatch(req):'
162 ret = None
162 ret = None
163 try:
163 try:
164 ret = _runcatch(req)
164 ret = _runcatch(req)
165 except KeyboardInterrupt:
165 except KeyboardInterrupt as inst:
166 try:
166 try:
167 req.ui.warn(_("interrupted!\n"))
167 if isinstance(inst, error.SignalInterrupt):
168 msg = _("killed!\n")
169 else:
170 msg = _("interrupted!\n")
171 req.ui.warn(msg)
168 except error.SignalInterrupt:
172 except error.SignalInterrupt:
169 # maybe pager would quit without consuming all the output, and
173 # maybe pager would quit without consuming all the output, and
170 # SIGPIPE was raised. we cannot print anything in this case.
174 # SIGPIPE was raised. we cannot print anything in this case.
@@ -186,8 +186,6 b' def callcatch(ui, func):'
186 ui.warn(_("abort: file censored %s!\n") % inst)
186 ui.warn(_("abort: file censored %s!\n") % inst)
187 except error.RevlogError as inst:
187 except error.RevlogError as inst:
188 ui.warn(_("abort: %s!\n") % inst)
188 ui.warn(_("abort: %s!\n") % inst)
189 except error.SignalInterrupt:
190 ui.warn(_("killed!\n"))
191 except error.InterventionRequired as inst:
189 except error.InterventionRequired as inst:
192 ui.warn("%s\n" % inst)
190 ui.warn("%s\n" % inst)
193 if inst.hint:
191 if inst.hint:
General Comments 0
You need to be logged in to leave comments. Login now