Show More
@@ -3449,18 +3449,8 b' def findext(name):' | |||
|
3449 | 3449 | return sys.modules[v] |
|
3450 | 3450 | raise KeyError(name) |
|
3451 | 3451 | |
|
3452 | def dispatch(args): | |
|
3453 | for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM': | |
|
3454 | num = getattr(signal, name, None) | |
|
3455 | if num: signal.signal(num, catchterm) | |
|
3456 | ||
|
3457 | try: | |
|
3458 | u = ui.ui(traceback='--traceback' in sys.argv[1:]) | |
|
3459 | except util.Abort, inst: | |
|
3460 | sys.stderr.write(_("abort: %s\n") % inst) | |
|
3461 | return -1 | |
|
3462 | ||
|
3463 | for ext_name, load_from_name in u.extensions(): | |
|
3452 | def load_extensions(ui, extensions): | |
|
3453 | for ext_name, load_from_name in extensions: | |
|
3464 | 3454 | try: |
|
3465 | 3455 | if load_from_name: |
|
3466 | 3456 | # the module will be loaded in sys.modules |
@@ -3483,8 +3473,9 b' def dispatch(args):' | |||
|
3483 | 3473 | except (util.SignalInterrupt, KeyboardInterrupt): |
|
3484 | 3474 | raise |
|
3485 | 3475 | except Exception, inst: |
|
3486 |
u.warn(_("*** failed to import extension %s: %s\n") % |
|
|
3487 | if u.print_exc(): | |
|
3476 | ui.warn(_("*** failed to import extension %s: %s\n") % | |
|
3477 | (ext_name, inst)) | |
|
3478 | if ui.print_exc(): | |
|
3488 | 3479 | return 1 |
|
3489 | 3480 | |
|
3490 | 3481 | for name in external.itervalues(): |
@@ -3495,8 +3486,21 b' def dispatch(args):' | |||
|
3495 | 3486 | cmdtable = getattr(mod, 'cmdtable', {}) |
|
3496 | 3487 | for t in cmdtable: |
|
3497 | 3488 | if t in table: |
|
3498 | u.warn(_("module %s overrides %s\n") % (name, t)) | |
|
3489 | ui.warn(_("module %s overrides %s\n") % (name, t)) | |
|
3499 | 3490 | table.update(cmdtable) |
|
3491 | ||
|
3492 | def dispatch(args): | |
|
3493 | for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM': | |
|
3494 | num = getattr(signal, name, None) | |
|
3495 | if num: signal.signal(num, catchterm) | |
|
3496 | ||
|
3497 | try: | |
|
3498 | u = ui.ui(traceback='--traceback' in sys.argv[1:]) | |
|
3499 | except util.Abort, inst: | |
|
3500 | sys.stderr.write(_("abort: %s\n") % inst) | |
|
3501 | return -1 | |
|
3502 | ||
|
3503 | load_extensions(u, u.extensions()) | |
|
3500 | 3504 | |
|
3501 | 3505 | try: |
|
3502 | 3506 | cmd, func, args, options, cmdoptions = parse(u, args) |
General Comments 0
You need to be logged in to leave comments.
Login now