~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

Update test support, and remove deprecated functions pullable_revisions and get_intervening_revisions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from bzrlib.trace import mutter
29
29
from bzrlib.transport import Transport, Server
30
30
from bzrlib.osutils import (abspath, realpath, normpath, pathjoin, rename, 
31
 
                            check_legal_path)
 
31
                            check_legal_path, rmtree)
32
32
 
33
33
 
34
34
class LocalTransport(Transport):
152
152
 
153
153
    def copy(self, rel_from, rel_to):
154
154
        """Copy the item at rel_from to the location at rel_to"""
155
 
        import shutil
156
155
        path_from = self.abspath(rel_from)
157
156
        path_to = self.abspath(rel_to)
158
157
        try:
202
201
            # Both from & to are on the local filesystem
203
202
            # Unfortunately, I can't think of anything faster than just
204
203
            # copying them across, one by one :(
205
 
            import shutil
206
 
 
207
204
            total = self._get_total(relpaths)
208
205
            count = 0
209
206
            for path in relpaths:
297
294
        super(ScratchTransport, self).__init__(base)
298
295
 
299
296
    def __del__(self):
300
 
        shutil.rmtree(self.base, ignore_errors=True)
 
297
        rmtree(self.base, ignore_errors=True)
301
298
        mutter("%r destroyed" % self)
302
299
 
303
300