-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Loïc Minier wrote:
> reopen 435240
> found 435240 0.90.0-1
> stop
> 
> On Tue, Aug 14, 2007, Aaron Bentley wrote:
>>> From: Loïc Minier <[EMAIL PROTECTED]>
>>>  multi-pull is relatively slow because it opens a connection for each
>>>  branch (especially ssh connections are slow).
>> Fixed in revno 572
> 
>  I checked with both http:// and sftp:// URLs, and I didn't see any
>  connection reuse: in Wireshark, I see a new SSH connection for each
>  branch I'm multi-pulling and a new HTTP connection for each GET (or at
>  least for each branch).

There appears to be a bug in the connection-reuse code for bzrlib.  Does
this patch fix it for you?

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGyK1W0F+nu1YWqI0RAkwlAJ9/Jf9Cl5w7rVZRLfUChTFf9VN0AwCeMnXW
hcA93/IEznssxOP5fdLjmXg=
=ud1/
-----END PGP SIGNATURE-----
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: [EMAIL PROTECTED]
#   1zf6k4sb4yb4wz0u
# target_branch: http://bazaar-vcs.org/bzr/bzr.dev
# testament_sha1: 98be18c1768be2d74d9cbf4a4cd86d20003555a8
# timestamp: 2007-08-19 16:49:19 -0400
# source_branch: http://code.aaronbentley.com/bzr/bzrrepo/bzr.ab
# base_revision_id: [EMAIL PROTECTED]
#   01tlqb2646s2spi5
# 
# Begin patch
=== modified file 'bzrlib/tests/test_transport.py'
--- bzrlib/tests/test_transport.py	2007-08-15 04:56:08 +0000
+++ bzrlib/tests/test_transport.py	2007-08-19 20:38:10 +0000
@@ -690,7 +690,10 @@
     """Tests for transport reuse"""
 
     def test_reuse_same_transport(self):
-        t1 = get_transport('http://foo/')
+        possible_transports = []
+        t1 = get_transport('http://foo/',
+                           possible_transports=possible_transports)
+        self.assertEqual([t1], possible_transports)
         t2 = get_transport('http://foo/', possible_transports=[t1])
         self.assertIs(t1, t2)
 

=== modified file 'bzrlib/transport/__init__.py'
--- bzrlib/transport/__init__.py	2007-08-16 01:02:17 +0000
+++ bzrlib/transport/__init__.py	2007-08-19 20:38:10 +0000
@@ -1392,7 +1392,7 @@
             'URLs must be properly escaped (protocol: %s)')
 
     transport = None
-    if possible_transports:
+    if possible_transports is not None:
         for t in possible_transports:
             t_same_connection = t._reuse_for(base)
             if t_same_connection is not None:
@@ -1405,7 +1405,7 @@
         if proto is not None and base.startswith(proto):
             transport, last_err = _try_transport_factories(base, factory_list)
             if transport:
-                if possible_transports:
+                if possible_transports is not None:
                     assert transport not in possible_transports
                     possible_transports.append(transport)
                 return transport

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWU+8jkIAAk//gEQUAIBR5///
cgEACr////BQBMyLwCpsQNijCSgTSapvExNMj1T0R6U09Mk009RoepoA5gAJgACYAAAAACREJU9l
PaVPKDaJ6EDQemoGho09QDmAAmAAJgAAAAAJJAhkDQKTyKfpqnoaNI00NGjaNIgFZry2jCr18tns
SxlHi7ChNTFYybtnnfBCyJso9kHN102Aiov7ybVwMBtg33dqONLZQ2Xl67TSsQs5401aj20iTlO6
+mGHbSD61iYcHGDdU55CMYFbYab2QoI6nPyOb2y0ibrtcAfWXlyxxZ1hqKefCxYVgaLwYvyqwMjZ
f2HXi2g23IMkGK6lX4YD+WCjbuJdEbi7EnBabwG79fikEepOdFOTTAP0CfFzkJgcrFOZCpKZaA75
k3/4C6XY3tzOgC/4nh1GhyHqy5GVOHlCKPBcPJSnu+hi5XMRXB/dg8wLfjAsAhEhgtdTkMVZVApm
5IGEXwy3NNHZEHlE1C01vHDIqam5v71dflm4iT1IuWPMwIAMrDAYwMqnA80djKM33IoWl4+5YmEz
KSxyNjNQPYBDAA10jmUOe8m2WhMbMXkXeGhGRxuYHBvEiMVcRXqc9EihIloWmsDcuJFpsYY0nZCx
quZiI6RU1iqEFsVuKFc9FoWBE27AKr8r6VSWDk4tID6Pcja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