10
10
from bzrlib.option import Option
11
11
import bzrlib.branch
12
12
from bzrlib.errors import BzrCommandError
13
sys.path.append(os.path.dirname(__file__))
14
13
from reweave_inventory import cmd_fix
14
sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__),
16
17
Option.OPTIONS['ignored'] = Option('ignored',
17
18
help='delete all ignored files.')
201
204
from errors import NoPyBaz
203
206
import baz_import
207
commands.append(baz_import.cmd_baz_import_branch)
204
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."
207
221
class cmd_baz_import(bzrlib.commands.Command):
208
222
"""Disabled. (Requires PyBaz)"""
209
takes_args = ['to_root_dir?', 'from_archive?']
210
takes_options = ['verbose']
211
def run(self, to_root_dir=None, from_archive=None, verbose=False):
212
print "This command is disabled. Please install PyBaz."
213
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))
216
232
if hasattr(bzrlib.commands, 'register_command'):
230
248
result = TestSuite()
231
249
result.addTest(DocTestSuite(bzrtools, optionflags=ELLIPSIS))
232
250
result.addTest(clean_tree.test_suite())
251
result.addTest(DocTestSuite(baz_import))
252
result.addTest(tests.test_suite())
233
253
result.addTest(TestLoader().loadTestsFromModule(shelf_tests))
234
254
result.addTest(blackbox.test_suite())