~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2006-03-13 00:13:56 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20060313001356-6aadd11700e1ac1f
MarkedĀ deprecationĀ bugs

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
    """
105
105
    takes_args = ['filename?']
106
106
    takes_options = ['strip']
107
 
    def run(self, filename=None, strip=0):
 
107
    def run(self, filename=None, strip=1):
108
108
        from patch import patch
109
109
        from bzrlib.branch import Branch
110
110
        b = Branch.open_containing('.')[0]
208
208
    commands.append(baz_import.cmd_baz_import)
209
209
 
210
210
except NoPyBaz:
 
211
    class cmd_baz_import_branch(bzrlib.commands.Command):
 
212
        """Disabled. (Requires PyBaz)"""
 
213
        takes_args = ['to_location?', 'from_branch?', 'reuse_history*']
 
214
        takes_options = ['verbose', Option('max-count', type=int)]
 
215
        def run(self, to_location=None, from_branch=None, fast=False, 
 
216
                max_count=None, verbose=False, dry_run=False,
 
217
                reuse_history_list=[]):
 
218
            print "This command is disabled.  Please install PyBaz."
 
219
 
 
220
 
211
221
    class cmd_baz_import(bzrlib.commands.Command):
212
222
        """Disabled. (Requires PyBaz)"""
213
 
        takes_args = ['to_root_dir?', 'from_archive?']
214
 
        takes_options = ['verbose']
215
 
        def run(self, to_root_dir=None, from_archive=None, verbose=False):
216
 
            print "This command is disabled.  Please install PyBaz."
217
 
    commands.append(cmd_baz_import)
 
223
        takes_args = ['to_root_dir?', 'from_archive?', 'reuse_history*']
 
224
        takes_options = ['verbose', Option('prefixes', type=str,
 
225
                         help="Prefixes of branches to import")]
 
226
        def run(self, to_root_dir=None, from_archive=None, verbose=False,
 
227
                reuse_history_list=[], prefixes=None):
 
228
                print "This command is disabled.  Please install PyBaz."
 
229
    commands.extend((cmd_baz_import_branch, cmd_baz_import))
218
230
 
219
231
 
220
232
if hasattr(bzrlib.commands, 'register_command'):
228
240
def test_suite():
229
241
    import baz_import
230
242
    import tests
231
 
    from doctest import DocTestSuite
 
243
    from doctest import DocTestSuite, ELLIPSIS
232
244
    from unittest import TestSuite, TestLoader
233
245
    import clean_tree
234
246
    import blackbox
235
247
    import shelf_tests
236
248
    result = TestSuite()
237
 
    result.addTest(DocTestSuite(bzrtools))
 
249
    result.addTest(DocTestSuite(bzrtools, optionflags=ELLIPSIS))
238
250
    result.addTest(clean_tree.test_suite())
239
251
    result.addTest(DocTestSuite(baz_import))
240
252
    result.addTest(tests.test_suite())