~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2005-11-04 23:18:25 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20051104231825-e1c079c6f517a0ee
Cherry-picked Robert's diff and push fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
commands = [cmd_shelve, cmd_unshelve, cmd_clean_tree, cmd_graph_ancestry,
147
147
            cmd_fetch_ghosts, cmd_patch, cmd_shell]
148
148
 
 
149
command_decorators = []
 
150
 
149
151
import bzrlib.builtins
150
152
if not hasattr(bzrlib.builtins, "cmd_annotate"):
151
153
    commands.append(annotate.cmd_annotate)
152
154
if not hasattr(bzrlib.builtins, "cmd_push"):
153
155
    commands.append(push.cmd_push)
 
156
else:
 
157
    command_decorators.append(push.cmd_push)
154
158
 
155
159
from errors import NoPyBaz
156
160
try:
166
170
            print "This command is disabled.  Please install PyBaz."
167
171
    commands.append(cmd_baz_import)
168
172
 
 
173
 
169
174
if hasattr(bzrlib.commands, 'register_command'):
170
175
    for command in commands:
171
176
        bzrlib.commands.register_command(command)
 
177
    for command in command_decorators:
 
178
        command._original_command = bzrlib.commands.register_command(
 
179
            command, True)
 
180
 
172
181
 
173
182
def test_suite():
174
183
    from doctest import DocTestSuite