~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_whitebox.py

  • Committer: wang
  • Date: 2006-10-29 13:41:32 UTC
  • mto: (2104.4.1 wang_65714)
  • mto: This revision was merged to the branch mainline in revision 2109.
  • Revision ID: wang@ubuntu-20061029134132-3d7f4216f20c4aef
Replace python's difflib by patiencediff because the worst case 
performance is cubic for difflib and people commiting large data 
files are often hurt by this. The worst case performance of patience is 
quadratic. Fix bug 65714.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 by Canonical Ltd
 
1
# Copyright (C) 2005, 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
17
17
import os
18
18
import unittest
19
19
 
 
20
from bzrlib import (
 
21
    osutils,
 
22
    )
20
23
from bzrlib.tests import TestCaseWithTransport, TestCase
21
24
from bzrlib.branch import Branch
22
25
from bzrlib.errors import PathNotChild
33
36
        if it is inside a branch and return the path relative to the base.
34
37
        """
35
38
        import tempfile
36
 
        from bzrlib.osutils import rmtree
37
39
        
38
40
        savedir = os.getcwdu()
39
41
        dtmp = tempfile.mkdtemp()
81
83
 
82
84
        finally:
83
85
            os.chdir(savedir)
84
 
            rmtree(dtmp)
 
86
            osutils.rmtree(dtmp)