~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2006-03-22 22:18:19 UTC
  • Revision ID: abentley@panoramicfeedback.com-20060322221819-0e627e73d1232926
Added zap command

Show diffs side-by-side

added added

removed removed

Lines of Context:
261
261
        from branchhistory import branch_history 
262
262
        return branch_history(branch)
263
263
 
 
264
 
 
265
class cmd_zap(bzrlib.commands.Command):
 
266
    """\
 
267
    Remove a checkout, if it can be done safely. <BZRTOOLS>
 
268
 
 
269
    This command will remove a checkout without losing data.  That means
 
270
    it only removes checkouts, 
 
271
    """
 
272
    takes_args = ["checkout"]
 
273
    def run(self, checkout):
 
274
        from zap import zap
 
275
        return zap(checkout)
 
276
 
 
277
 
264
278
commands = [cmd_shelve, cmd_unshelve, cmd_shelf, cmd_clean_tree,
265
279
            cmd_graph_ancestry, cmd_fetch_ghosts, cmd_patch, cmd_shell,
266
 
            cmd_branch_history]
267
 
 
268
 
command_decorators = []
269
 
 
270
 
command_decorators = []
 
280
            cmd_branch_history, cmd_zap]
 
281
 
 
282
 
 
283
command_decorators = []
 
284
 
271
285
 
272
286
import bzrlib.builtins
273
287
if not hasattr(bzrlib.builtins, "cmd_push"):
318
332
    from doctest import DocTestSuite, ELLIPSIS
319
333
    from unittest import TestSuite
320
334
    import clean_tree
 
335
    import zap
321
336
    import tests.blackbox
322
337
    import tests.shelf_tests
323
338
    result = TestSuite()
327
342
    result.addTest(tests.test_suite())
328
343
    result.addTest(TestLoader().loadTestsFromModule(tests.shelf_tests))
329
344
    result.addTest(tests.blackbox.test_suite())
 
345
    result.addTest(zap.test_suite())
330
346
    return result