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__))
13
14
from reweave_inventory import cmd_fix
14
sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__),
17
16
Option.OPTIONS['ignored'] = Option('ignored',
18
17
help='delete all ignored files.')
105
104
takes_args = ['filename?']
106
105
takes_options = ['strip']
107
def run(self, filename=None, strip=1):
106
def run(self, filename=None, strip=0):
108
107
from patch import patch
109
108
from bzrlib.branch import Branch
110
109
b = Branch.open_containing('.')[0]
204
201
from errors import NoPyBaz
206
203
import baz_import
207
commands.append(baz_import.cmd_baz_import_branch)
208
204
commands.append(baz_import.cmd_baz_import)
211
class cmd_baz_import_branch(bzrlib.commands.Command):
207
class cmd_baz_import(bzrlib.commands.Command):
212
208
"""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=[]):
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):
218
212
print "This command is disabled. Please install PyBaz."
221
class cmd_baz_import(bzrlib.commands.Command):
222
"""Disabled. (Requires PyBaz)"""
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))
213
commands.append(cmd_baz_import)
232
216
if hasattr(bzrlib.commands, 'register_command'):
240
224
def test_suite():
243
from doctest import DocTestSuite, ELLIPSIS
225
from doctest import DocTestSuite
244
226
from unittest import TestSuite, TestLoader
245
227
import clean_tree
247
229
import shelf_tests
248
230
result = TestSuite()
249
result.addTest(DocTestSuite(bzrtools, optionflags=ELLIPSIS))
231
result.addTest(DocTestSuite(bzrtools))
250
232
result.addTest(clean_tree.test_suite())
251
result.addTest(DocTestSuite(baz_import))
252
result.addTest(tests.test_suite())
253
233
result.addTest(TestLoader().loadTestsFromModule(shelf_tests))
254
234
result.addTest(blackbox.test_suite())