~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Vincent Ladeuil
  • Date: 2011-09-27 11:48:50 UTC
  • mto: This revision was merged to the branch mainline in revision 6173.
  • Revision ID: v.ladeuil+lp@free.fr-20110927114850-338r2mns0138klv0
Global options respect their hidden attribute

Show diffs side-by-side

added added

removed removed

Lines of Context:
663
663
            opts['quiet'] = trace.is_quiet()
664
664
        elif opts.has_key('quiet'):
665
665
            del opts['quiet']
 
666
 
666
667
        # mix arguments and options into one dictionary
667
668
        cmdargs = _match_argform(self.name(), self.takes_args, args)
668
669
        cmdopts = {}
1040
1041
 
1041
1042
    argv_copy = []
1042
1043
    i = 0
1043
 
    override_config = []
1044
1044
    while i < len(argv):
1045
1045
        a = argv[i]
1046
1046
        if a == '--profile':
1069
1069
            pass # already handled in startup script Bug #588277
1070
1070
        elif a.startswith('-D'):
1071
1071
            debug.debug_flags.add(a[2:])
1072
 
        elif a.startswith('-O'):
1073
 
            override_config.append(a[2:])
1074
1072
        else:
1075
1073
            argv_copy.append(a)
1076
1074
        i += 1
1077
1075
 
1078
 
    bzrlib.global_state.cmdline_overrides._from_cmdline(override_config)
1079
 
 
1080
1076
    debug.set_debug_flags_from_config()
1081
1077
 
1082
1078
    if not opt_no_plugins:
1134
1130
        if 'memory' in debug.debug_flags:
1135
1131
            trace.debug_memory('Process status after command:', short=False)
1136
1132
        option._verbosity_level = saved_verbosity_level
1137
 
        # Reset the overrides 
1138
 
        bzrlib.global_state.cmdline_overrides._reset()
1139
1133
 
1140
1134
 
1141
1135
def display_command(func):
1170
1164
        "bzr plugin commands")
1171
1165
    Command.hooks.install_named_hook("get_command", _get_external_command,
1172
1166
        "bzr external command lookup")
1173
 
    Command.hooks.install_named_hook("get_missing_command",
1174
 
                                     _try_plugin_provider,
1175
 
                                     "bzr plugin-provider-db check")
 
1167
    Command.hooks.install_named_hook("get_missing_command", _try_plugin_provider,
 
1168
        "bzr plugin-provider-db check")
1176
1169
 
1177
1170
 
1178
1171