~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree_4.py

Merge cleanup into description

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
        repo = tree.branch.repository
177
177
        repo.get_revision = self.fail
178
178
        repo.get_inventory = self.fail
179
 
        repo.get_inventory_xml = self.fail
 
179
        repo._get_inventory_xml = self.fail
180
180
        # try to set the parent trees.
181
181
        tree.set_parent_trees([(rev1, rev1_tree)])
182
182
 
215
215
        # cache the parents of a parent tree at this point.
216
216
        #repo.get_revision = self.fail
217
217
        repo.get_inventory = self.fail
218
 
        repo.get_inventory_xml = self.fail
 
218
        repo._get_inventory_xml = self.fail
219
219
        # set the parent trees.
220
220
        tree.set_parent_trees([(rev1, rev1_tree), (rev2, rev2_tree)])
221
221
        # read the first tree
555
555
        tree.commit('one', rev_id='rev-1')
556
556
        # Trap osutils._walkdirs_utf8 to spy on what dirs have been accessed.
557
557
        returned = []
558
 
        orig_walkdirs = osutils._walkdirs_utf8
559
 
        def reset():
560
 
            osutils._walkdirs_utf8 = orig_walkdirs
561
 
        self.addCleanup(reset)
562
558
        def walkdirs_spy(*args, **kwargs):
563
 
            for val in orig_walkdirs(*args, **kwargs):
 
559
            for val in orig(*args, **kwargs):
564
560
                returned.append(val[0][0])
565
561
                yield val
566
 
        osutils._walkdirs_utf8 = walkdirs_spy
 
562
        orig = self.overrideAttr(osutils, '_walkdirs_utf8', walkdirs_spy)
567
563
 
568
564
        basis = tree.basis_tree()
569
565
        tree.lock_read()