/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: Martin Pool
  • Date: 2010-03-15 23:17:03 UTC
  • mto: This revision was merged to the branch mainline in revision 5111.
  • Revision ID: mbp@canonical.com-20100315231703-bmj1gv85ub0qaybo
Rename registry to builtin_command_registry

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
 
120
120
 
121
121
plugin_cmds = CommandRegistry()
122
 
builtin_cmds = CommandRegistry()
 
122
builtin_command_registry = CommandRegistry()
123
123
 
124
124
 
125
125
def register_command(cmd, decorate=False):
136
136
 
137
137
 
138
138
def _builtin_commands():
 
139
    """Return a dict of {name: cmd_class} for builtin commands.
 
140
 
 
141
    :deprecated: Use the builtin_command_registry registry instead
 
142
    """
139
143
    # return dict(name: cmd_class)
140
 
    return dict(builtin_cmds.items())
 
144
    return dict(builtin_command_registry.items())
141
145
 
142
146
 
143
147
def _register_builtin_commands():
144
 
    if builtin_cmds.keys():
 
148
    if builtin_command_registry.keys():
145
149
        # only load once
146
150
        return
147
151
    import bzrlib.builtins
148
152
    for cmd_class in _scan_module_for_commands(bzrlib.builtins).values():
149
 
        builtin_cmds.register(cmd_class)
 
153
        builtin_command_registry.register(cmd_class)
150
154
 
151
155
 
152
156
def _scan_module_for_commands(module):
183
187
    Use of all_command_names() is encouraged rather than builtin_command_names
184
188
    and/or plugin_command_names.
185
189
    """
186
 
    return _builtin_commands().keys()
 
190
    return builtin_command_registry.keys()
187
191
 
188
192
 
189
193
def plugin_command_names():