~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_reconfigure.py

  • Committer: Andrew Bennetts
  • Date: 2010-10-13 06:14:37 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101013061437-2e2m9gro1eusnbb8
Tweaks to the sphinx build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    reconfigure,
22
22
    repository,
23
23
    tests,
24
 
    vf_repository,
25
24
    workingtree,
26
25
    )
27
26
 
47
46
 
48
47
    def test_tree_with_pending_merge_to_branch(self):
49
48
        tree = self.make_branch_and_tree('tree')
50
 
        tree.commit('unchanged')
51
49
        other_tree = tree.bzrdir.sprout('other').open_workingtree()
52
 
        other_tree.commit('mergeable commit')
 
50
        self.build_tree(['other/file'])
 
51
        other_tree.add('file')
 
52
        other_tree.commit('file added')
53
53
        tree.merge_from_branch(other_tree.branch)
54
54
        reconfiguration = reconfigure.Reconfigure.to_branch(tree.bzrdir)
55
55
        self.assertRaises(errors.UncommittedChanges, reconfiguration.apply)
259
259
    def test_branch_to_lightweight_checkout_failure(self):
260
260
        parent, child, reconfiguration = \
261
261
            self.prepare_branch_to_lightweight_checkout()
262
 
        old_Repository_fetch = vf_repository.VersionedFileRepository.fetch
263
 
        vf_repository.VersionedFileRepository.fetch = None
 
262
        old_Repository_fetch = repository.Repository.fetch
 
263
        repository.Repository.fetch = None
264
264
        try:
265
265
            self.assertRaises(TypeError, reconfiguration.apply)
266
266
        finally:
267
 
            vf_repository.VersionedFileRepository.fetch = old_Repository_fetch
 
267
            repository.Repository.fetch = old_Repository_fetch
268
268
        child = _mod_branch.Branch.open('child')
269
269
        self.assertContainsRe(child.base, 'child/$')
270
270