~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree_4.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
# Authors:  Robert Collins <robert.collins@canonical.com>
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
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()