/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree_4.py

  • Committer: Vincent Ladeuil
  • Date: 2010-01-25 17:48:22 UTC
  • mto: (4987.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4988.
  • Revision ID: v.ladeuil+lp@free.fr-20100125174822-nce4l19sbwx83jvq
Deploying the new overrideAttr facility further reduces the complexity
and make the code clearer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
        # XXX: Brittle code below (restore_attribute may not return the right
559
 
        # value) -- vila 100123
560
 
        orig_walkdirs = self.addAttrCleanup(osutils, '_walkdirs_utf8')
561
558
        def walkdirs_spy(*args, **kwargs):
562
 
            for val in orig_walkdirs(*args, **kwargs):
 
559
            for val in orig(*args, **kwargs):
563
560
                returned.append(val[0][0])
564
561
                yield val
565
 
        osutils._walkdirs_utf8 = walkdirs_spy
 
562
        orig = self.overrideAttr(osutils, '_walkdirs_utf8', walkdirs_spy)
566
563
 
567
564
        basis = tree.basis_tree()
568
565
        tree.lock_read()