equal
deleted
inserted
replaced
24 return -1 |
24 return -1 |
25 return _runcatch(u, args) |
25 return _runcatch(u, args) |
26 |
26 |
27 def _runcatch(ui, args): |
27 def _runcatch(ui, args): |
28 def catchterm(*args): |
28 def catchterm(*args): |
29 raise util.SignalInterrupt |
29 raise error.SignalInterrupt |
30 |
30 |
31 for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM': |
31 for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM': |
32 num = getattr(signal, name, None) |
32 num = getattr(signal, name, None) |
33 if num: signal.signal(num, catchterm) |
33 if num: signal.signal(num, catchterm) |
34 |
34 |
72 except error.LockUnavailable, inst: |
72 except error.LockUnavailable, inst: |
73 ui.warn(_("abort: could not lock %s: %s\n") % |
73 ui.warn(_("abort: could not lock %s: %s\n") % |
74 (inst.desc or inst.filename, inst.strerror)) |
74 (inst.desc or inst.filename, inst.strerror)) |
75 except error.RevlogError, inst: |
75 except error.RevlogError, inst: |
76 ui.warn(_("abort: %s!\n") % inst) |
76 ui.warn(_("abort: %s!\n") % inst) |
77 except util.SignalInterrupt: |
77 except error.SignalInterrupt: |
78 ui.warn(_("killed!\n")) |
78 ui.warn(_("killed!\n")) |
79 except KeyboardInterrupt: |
79 except KeyboardInterrupt: |
80 try: |
80 try: |
81 ui.warn(_("interrupted!\n")) |
81 ui.warn(_("interrupted!\n")) |
82 except IOError, inst: |
82 except IOError, inst: |