~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_reconfigure.py

  • Committer: Aaron Bentley
  • Date: 2008-04-12 05:48:07 UTC
  • mto: This revision was merged to the branch mainline in revision 3364.
  • Revision ID: aaron@aaronbentley.com-20080412054807-47yd7dgjufa0nf98
rename 'sharing' to 'use-shared'

Show diffs side-by-side

added added

removed removed

Lines of Context:
287
287
        self.assertRaises(errors.NoRepositoryPresent,
288
288
                          repository.Repository.open, 'repo')
289
289
 
290
 
    def test_standalone_to_sharing(self):
 
290
    def test_standalone_to_use_shared(self):
291
291
        self.build_tree(['root/'])
292
292
        tree = self.make_branch_and_tree('root/tree')
293
293
        tree.commit('Hello', rev_id='hello-id')
294
294
        repo = self.make_repository('root', shared=True)
295
 
        reconfiguration = reconfigure.Reconfigure.to_sharing(tree.bzrdir)
 
295
        reconfiguration = reconfigure.Reconfigure.to_use_shared(tree.bzrdir)
296
296
        reconfiguration.apply()
297
297
        tree = workingtree.WorkingTree.open('root/tree')
298
298
        self.assertTrue(repo.has_same_location(tree.branch.repository))
299
299
        self.assertEqual('Hello', repo.get_revision('hello-id').message)
300
300
 
301
 
    def make_sharing_tree(self):
 
301
    def make_repository_tree(self):
302
302
        self.build_tree(['root/'])
303
303
        repo = self.make_repository('root', shared=True)
304
304
        tree = self.make_branch_and_tree('root/tree')
305
 
        reconfigure.Reconfigure.to_sharing(tree.bzrdir).apply()
 
305
        reconfigure.Reconfigure.to_use_shared(tree.bzrdir).apply()
306
306
        return workingtree.WorkingTree.open('root/tree')
307
307
 
308
 
    def test_sharing_to_sharing(self):
309
 
        tree = self.make_sharing_tree()
310
 
        self.assertRaises(errors.AlreadySharing,
311
 
                          reconfigure.Reconfigure.to_sharing, tree.bzrdir)
 
308
    def test_use_shared_to_use_shared(self):
 
309
        tree = self.make_repository_tree()
 
310
        self.assertRaises(errors.AlreadyUsingShared,
 
311
                          reconfigure.Reconfigure.to_use_shared, tree.bzrdir)
312
312
 
313
 
    def test_sharing_to_standalone(self):
314
 
        tree = self.make_sharing_tree()
 
313
    def test_use_shared_to_standalone(self):
 
314
        tree = self.make_repository_tree()
315
315
        tree.commit('Hello', rev_id='hello-id')
316
316
        reconfigure.Reconfigure.to_standalone(tree.bzrdir).apply()
317
317
        tree = workingtree.WorkingTree.open('root/tree')