23
23
from bzrlib.branchbuilder import BranchBuilder
26
class TestReconfigure(tests.TestCaseWithTransport):
24
from bzrlib.tests.script import TestCaseWithTransportAndScript
27
class TestReconfigure(TestCaseWithTransportAndScript):
28
29
def test_no_type(self):
29
30
branch = self.make_branch('branch')
132
133
self.run_bzr('reconfigure --with-no-trees --force',
133
134
working_dir='repo/branch')
134
self.failUnlessExists('repo/branch/foo')
135
self.assertPathExists('repo/branch/foo')
135
136
tree = workingtree.WorkingTree.open('repo/branch')
137
138
def test_shared_format_to_standalone(self, format=None):
175
176
self.run_bzr('revert', working_dir='checkout')
176
177
self.check_file_contents('checkout/file', 'foo\n')
178
def test_lightweight_knit_checkout_to_tree(self, format=None):
179
def test_lightweight_knit_checkout_to_tree(self):
179
180
self.test_lightweight_format_checkout_to_tree('knit')
181
def test_lightweight_pack092_checkout_to_tree(self, format=None):
182
def test_lightweight_pack092_checkout_to_tree(self):
182
183
self.test_lightweight_format_checkout_to_tree('pack-0.92')
184
def test_lightweight_rich_root_pack_checkout_to_tree(self, format=None):
185
def test_lightweight_rich_root_pack_checkout_to_tree(self):
185
186
self.test_lightweight_format_checkout_to_tree('rich-root-pack')
188
def test_branch_and_use_shared(self):
191
$ echo foo > branch/foo
192
$ bzr add -q branch/foo
193
$ bzr commit -q -m msg branch
195
$ bzr reconfigure --branch --use-shared branch
197
Repository branch (format: ...)
200
repository branch: branch
203
def test_use_shared_and_branch(self):
206
$ echo foo > branch/foo
207
$ bzr add -q branch/foo
208
$ bzr commit -q -m msg branch
210
$ bzr reconfigure --use-shared --branch branch
212
Repository branch (format: ...)
215
repository branch: branch
188
219
class TestReconfigureStacking(tests.TestCaseWithTransport):
197
228
* then make the second unstacked, so it has to fill in history from
198
229
the original fallback lying underneath its original content
200
See discussion in <https://bugs.edge.launchpad.net/bzr/+bug/391411>
231
See discussion in <https://bugs.launchpad.net/bzr/+bug/391411>
202
233
# there are also per_branch tests that exercise remote operation etc
203
234
tree_1 = self.make_branch_and_tree('b1', format='2a')