/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Aaron Bentley
  • Date: 2009-09-29 04:40:55 UTC
  • mfrom: (4717 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4718.
  • Revision ID: aaron@aaronbentley.com-20090929044055-e9jtpmz6eyut711h
Merged bzr.dev into fix_get_mtime.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
            registry.Registry.register(self, k_unsquished, cmd,
102
102
                                       override_existing=decorate, info=info)
103
103
        except KeyError:
104
 
            trace.log_error('Two plugins defined the same command: %r' % k)
105
 
            trace.log_error('Not loading the one in %r' %
106
 
                            sys.modules[cmd.__module__])
107
 
            trace.log_error('Previously this command was registered from %r' %
108
 
                            sys.modules[previous.__module__])
 
104
            trace.warning('Two plugins defined the same command: %r' % k)
 
105
            trace.warning('Not loading the one in %r' %
 
106
                sys.modules[cmd.__module__])
 
107
            trace.warning('Previously this command was registered from %r' %
 
108
                sys.modules[previous.__module__])
109
109
        return previous
110
110
 
111
111
    def register_lazy(self, command_name, aliases, module_name):
457
457
        # so we get <https://bugs.launchpad.net/bzr/+bug/249908>.  -- mbp
458
458
        # 20090319
459
459
        options = option.get_optparser(self.options()).format_option_help()
 
460
        # XXX: According to the spec, ReST option lists actually don't support 
 
461
        # options like --1.9 so that causes syntax errors (in Sphinx at least).
 
462
        # As that pattern always appears in the commands that break, we trap
 
463
        # on that and then format that block of 'format' options as a literal
 
464
        # block.
 
465
        if not plain and options.find('  --1.9  ') != -1:
 
466
            options = options.replace(' format:\n', ' format::\n\n', 1)
460
467
        if options.startswith('Options:'):
461
468
            result += ':' + options
462
469
        elif options.startswith('options:'):
1028
1035
            ret = apply_coveraged(opt_coverage_dir, run, *run_argv)
1029
1036
        else:
1030
1037
            ret = run(*run_argv)
1031
 
        if 'memory' in debug.debug_flags:
1032
 
            trace.debug_memory('Process status after command:', short=False)
1033
1038
        return ret or 0
1034
1039
    finally:
1035
1040
        # reset, in case we may do other commands later within the same
1036
1041
        # process. Commands that want to execute sub-commands must propagate
1037
1042
        # --verbose in their own way.
 
1043
        if 'memory' in debug.debug_flags:
 
1044
            trace.debug_memory('Process status after command:', short=False)
1038
1045
        option._verbosity_level = saved_verbosity_level
1039
1046
 
1040
1047
 
1107
1114
        argv = new_argv
1108
1115
    ret = run_bzr_catch_errors(argv)
1109
1116
    trace.mutter("return code %d", ret)
 
1117
    osutils.report_extension_load_failures()
1110
1118
    return ret
1111
1119
 
1112
1120