comparison mercurial/dispatch.py @ 5633:e04a65111a80

dispatch: report OOM rather than traceback
author Matt Mackall <mpm@selenic.com>
date Mon, 10 Dec 2007 10:23:45 -0600
parents 253736bb0dc9
children da72b4d24797
comparison
equal deleted inserted replaced
5632:fe2e81229819 5633:e04a65111a80
131 elif m in "zlib".split(): 131 elif m in "zlib".split():
132 ui.warn(_("(is your Python install correct?)\n")) 132 ui.warn(_("(is your Python install correct?)\n"))
133 133
134 except util.Abort, inst: 134 except util.Abort, inst:
135 ui.warn(_("abort: %s\n") % inst) 135 ui.warn(_("abort: %s\n") % inst)
136 except MemoryError:
137 ui.warn(_("abort: out of memory\n"))
136 except SystemExit, inst: 138 except SystemExit, inst:
137 # Commands shouldn't sys.exit directly, but give a return code. 139 # Commands shouldn't sys.exit directly, but give a return code.
138 # Just in case catch this and and pass exit code to caller. 140 # Just in case catch this and and pass exit code to caller.
139 return inst.code 141 return inst.code
140 except: 142 except: