equal
deleted
inserted
replaced
120 ui.warn(_("abort: could not import module %s!\n" % m)) |
120 ui.warn(_("abort: could not import module %s!\n" % m)) |
121 if m in "mpatch bdiff".split(): |
121 if m in "mpatch bdiff".split(): |
122 ui.warn(_("(did you forget to compile extensions?)\n")) |
122 ui.warn(_("(did you forget to compile extensions?)\n")) |
123 elif m in "zlib".split(): |
123 elif m in "zlib".split(): |
124 ui.warn(_("(is your Python install correct?)\n")) |
124 ui.warn(_("(is your Python install correct?)\n")) |
125 |
125 |
126 except util.Abort, inst: |
126 except util.Abort, inst: |
127 ui.warn(_("abort: %s\n") % inst) |
127 ui.warn(_("abort: %s\n") % inst) |
128 except SystemExit, inst: |
128 except SystemExit, inst: |
129 # Commands shouldn't sys.exit directly, but give a return code. |
129 # Commands shouldn't sys.exit directly, but give a return code. |
130 # Just in case catch this and and pass exit code to caller. |
130 # Just in case catch this and and pass exit code to caller. |
330 if ret: |
330 if ret: |
331 return ret |
331 return ret |
332 ret = runcommand(ui, options, cmd, d) |
332 ret = runcommand(ui, options, cmd, d) |
333 # run post-hook, passing command result |
333 # run post-hook, passing command result |
334 hook.hook(ui, repo, "post-%s" % cmd, False, args=" ".join(fullargs), |
334 hook.hook(ui, repo, "post-%s" % cmd, False, args=" ".join(fullargs), |
335 result = ret) |
335 result = ret) |
336 return ret |
336 return ret |
337 |
337 |
338 def runcommand(ui, options, cmd, cmdfunc): |
338 def runcommand(ui, options, cmd, cmdfunc): |
339 def checkargs(): |
339 def checkargs(): |
340 try: |
340 try: |