~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 2004.1.1.

Connection sharing, with redirection. without authentification.

* bzrlib/transport/http/_urllib.py:
(Request): Deleted. The _urllib2 version is shiniest.
(HttpTransport_urllib): Share connections.
(HttpTransport_urllib._perform): New method.
(HttpTransport_urllib._get): Takes the _urllib2_wrappers into
account.
(HttpTransport_urllib._get_url_impl): Deleted.
(HttpTransport_urllib._head): New method.
(HttpTransport_urllib.has): Takes the _urllib2_wrappers into
account.
(HttpTransport_urllib.copy_to, HttpTransport_urllib.move,
HttpTransport_urllib.delete): Deleted. Were carbon copies of
HttpTransportBase.

* bzrlib/tests/test_http.py:
(TestHttpConnections_urllib.test_has_on_bogus_host): The timeout
was too high, at least on Mac OS X 10.3 the test was taking a
whole *minute*. Also, the new implementation raise a nice
ConnectionError.

* bzrlib/errors.py:
(ConnectionError): Don't don't repeat ConnectionError.

* bzrlib/transport/http/_urllib2_wrappers.py: 
New file. Wrappers around urllib2 framework.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: