/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/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-12 21:19:54 UTC
  • mto: This revision was merged to the branch mainline in revision 2071.
  • Revision ID: john@arbash-meinel.com-20060912211954-3d8074cfb66e1139
Find a few places that weren't importing their dependencies.
Demandload a few more places.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
it.
27
27
"""
28
28
 
 
29
from cStringIO import StringIO
 
30
import re
 
31
import sys
 
32
 
 
33
from bzrlib.lazy_import import lazy_import
 
34
lazy_import(globals(), """
29
35
import errno
30
36
from collections import deque
31
37
from copy import deepcopy
32
 
from cStringIO import StringIO
33
 
import re
34
38
from stat import S_ISDIR
35
 
import sys
36
 
from unittest import TestSuite
 
39
import unittest
37
40
import urllib
38
41
import urlparse
39
42
import warnings
45
48
    symbol_versioning,
46
49
    urlutils,
47
50
    )
48
 
from bzrlib.errors import DependencyNotPresent
49
 
from bzrlib.osutils import pumpfile
 
51
""")
 
52
 
50
53
from bzrlib.symbol_versioning import (
51
54
        deprecated_passed,
52
55
        deprecated_method,
259
262
        """
260
263
        assert not isinstance(from_file, basestring), \
261
264
            '_pump should only be called on files not %s' % (type(from_file,))
262
 
        pumpfile(from_file, to_file)
 
265
        osutils.pumpfile(from_file, to_file)
263
266
 
264
267
    def _get_total(self, multi):
265
268
        """Try to figure out how many entries are in multi,
948
951
    for factory in factory_list:
949
952
        try:
950
953
            return factory(base), None
951
 
        except DependencyNotPresent, e:
 
954
        except errors.DependencyNotPresent, e:
952
955
            mutter("failed to instantiate transport %r for %r: %r" %
953
956
                    (factory, base, e))
954
957
            last_err = e
1001
1004
    """
1002
1005
 
1003
1006
    def adapt(self, test):
1004
 
        result = TestSuite()
 
1007
        result = unittest.TestSuite()
1005
1008
        for klass, server_factory in self._test_permutations():
1006
1009
            new_test = deepcopy(test)
1007
1010
            new_test.transport_class = klass