~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_reconfigure.py

(gz) Remove bzrlib/util/elementtree/ package (Martin Packman)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    reconfigure,
22
22
    repository,
23
23
    tests,
 
24
    vf_repository,
24
25
    workingtree,
25
26
    )
26
27
 
46
47
 
47
48
    def test_tree_with_pending_merge_to_branch(self):
48
49
        tree = self.make_branch_and_tree('tree')
 
50
        tree.commit('unchanged')
49
51
        other_tree = tree.bzrdir.sprout('other').open_workingtree()
50
 
        self.build_tree(['other/file'])
51
 
        other_tree.add('file')
52
 
        other_tree.commit('file added')
 
52
        other_tree.commit('mergeable commit')
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 = repository.Repository.fetch
263
 
        repository.Repository.fetch = None
 
262
        old_Repository_fetch = vf_repository.VersionedFileRepository.fetch
 
263
        vf_repository.VersionedFileRepository.fetch = None
264
264
        try:
265
265
            self.assertRaises(TypeError, reconfiguration.apply)
266
266
        finally:
267
 
            repository.Repository.fetch = old_Repository_fetch
 
267
            vf_repository.VersionedFileRepository.fetch = old_Repository_fetch
268
268
        child = _mod_branch.Branch.open('child')
269
269
        self.assertContainsRe(child.base, 'child/$')
270
270