/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/transport/local.py

  • Committer: John Arbash Meinel
  • Date: 2006-05-10 19:59:55 UTC
  • mfrom: (1704 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: john@arbash-meinel.com-20060510195955-df080afb1daa3a96
[merge] bzr.dev 1704

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
import tempfile
26
26
 
27
27
from bzrlib.osutils import (abspath, realpath, normpath, pathjoin, rename, 
28
 
                            check_legal_path)
 
28
                            check_legal_path, rmtree)
29
29
from bzrlib.symbol_versioning import warn
30
30
from bzrlib.trace import mutter
31
31
from bzrlib.transport import Transport, Server
171
171
 
172
172
    def copy(self, rel_from, rel_to):
173
173
        """Copy the item at rel_from to the location at rel_to"""
174
 
        import shutil
175
174
        path_from = self.local_abspath(rel_from)
176
175
        path_to = self.local_abspath(rel_to)
177
176
        try:
221
220
            # Both from & to are on the local filesystem
222
221
            # Unfortunately, I can't think of anything faster than just
223
222
            # copying them across, one by one :(
224
 
            import shutil
225
 
 
226
223
            total = self._get_total(relpaths)
227
224
            count = 0
228
225
            for path in relpaths:
316
313
        super(ScratchTransport, self).__init__(base)
317
314
 
318
315
    def __del__(self):
319
 
        shutil.rmtree(self.base, ignore_errors=True)
 
316
        rmtree(self.base, ignore_errors=True)
320
317
        mutter("%r destroyed" % self)
321
318
 
322
319