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)
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."
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))
220
232
if hasattr(bzrlib.commands, 'register_command'):
228
240
def test_suite():
229
241
import baz_import
231
from doctest import DocTestSuite
243
from doctest import DocTestSuite, ELLIPSIS
232
244
from unittest import TestSuite, TestLoader
233
245
import clean_tree
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())