~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-05 17:36:56 UTC
  • mto: This revision was merged to the branch mainline in revision 3364.
  • Revision ID: aaron@aaronbentley.com-20080405173656-yfi7fhfhh0vwre5f
Initial make-sharing functionality

Show diffs side-by-side

added added

removed removed

Lines of Context:
286
286
        workingtree.WorkingTree.open('repo')
287
287
        self.assertRaises(errors.NoRepositoryPresent,
288
288
                          repository.Repository.open, 'repo')
 
289
 
 
290
    def test_standalone_to_sharing(self):
 
291
        self.build_tree(['root/'])
 
292
        tree = self.make_branch_and_tree('root/tree')
 
293
        tree.commit('Hello', rev_id='hello-id')
 
294
        repo = self.make_repository('root', shared=True)
 
295
        reconfiguration = reconfigure.Reconfigure.to_sharing(tree.bzrdir)
 
296
        reconfiguration.apply()
 
297
        tree = workingtree.WorkingTree.open('root/tree')
 
298
        self.assertTrue(repo.has_same_location(tree.branch.repository))
 
299
        self.assertEqual('Hello', repo.get_revision('hello-id').message)