~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_whitebox.py

  • Committer: Martin Pool
  • Date: 2006-05-05 01:15:53 UTC
  • mto: This revision was merged to the branch mainline in revision 1698.
  • Revision ID: mbp@sourcefrog.net-20060505011553-76b4687a5e1d01e3
[patch] force deletion of trees containing readonly files (alexander)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
        job: given a path (either relative to cwd or absolute), work out
17
17
        if it is inside a branch and return the path relative to the base.
18
18
        """
19
 
        import tempfile, shutil
 
19
        import tempfile
 
20
        from bzrlib.osutils import rmtree
20
21
        
21
22
        savedir = os.getcwdu()
22
23
        dtmp = tempfile.mkdtemp()
64
65
 
65
66
        finally:
66
67
            os.chdir(savedir)
67
 
            shutil.rmtree(dtmp)
 
68
            rmtree(dtmp)