~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/_urllib.py

Connection sharing between cloned transports.

* bzrlib/transport/http/__init__.py:
(HttpTransportBase.clone): <cough> We can't decide for the class
daughters how the cloning occurs. We just give them the hint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
        """Set the base path where files will be stored."""
59
59
        super(HttpTransport_urllib, self).__init__(base)
60
60
        if from_transport is not None:
 
61
            # Tracing transport creations that use cloning process
 
62
            # mutter('Cloning HttpTransport_urllib '
 
63
            #       + 'for base : [%s], from base [%s]' % (base,
 
64
            #                                              from_transport.base))
 
65
            # import traceback
 
66
            # mutter(''.join(traceback.format_stack()))
61
67
            self._accept_ranges = from_transport._accept_ranges
62
68
            self._connection = from_transport._connection
63
69
            self._user = from_transport._user
64
70
            self._password = from_transport._password
65
71
        else:
66
72
            # Tracing transport creations that avoid cloning process
67
 
            # mutter('Creating new HttpTransport_urllib')
 
73
            # mutter('Creating new HttpTransport_urllib for base : [%s]' % base)
68
74
            # import traceback
69
75
            # mutter(''.join(traceback.format_stack()))
70
76
            self._accept_ranges = True