~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_reconfigure.py

  • Committer: Andrew Bennetts
  • Date: 2009-09-08 08:09:25 UTC
  • mto: (4634.6.27 2.0)
  • mto: This revision was merged to the branch mainline in revision 4680.
  • Revision ID: andrew.bennetts@canonical.com-20090908080925-ccmjw4kzzz7bepg7
Fix more tests to cope with new commit_write_group strictness.

Show diffs side-by-side

added added

removed removed

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