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

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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
796
796
 
797
797
 
798
798
class ConnectionError(TransportError):
799
 
    """Connection error: %(msg)s %(orig_error)s"""
 
799
    """%(msg)s %(orig_error)s"""
800
800
 
801
801
 
802
802
class ConnectionReset(TransportError):