Do you need to close a branch? (if so how)

John Arbash Meinel john at arbash-meinel.com
Thu Feb 26 14:48:00 GMT 2009


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

Robert Collins wrote:
> On Thu, 2009-02-26 at 18:48 +1300, Michael Hudson wrote:
>>
>> We had this problem with codebrowse (which access branches over HTTP)
>> and eventually arrived at the same solution as you.  I think there
>> should probably be a Transport.close() method.
> 
> This definitely should not be needed.
> 
> If:
> foo = get_transport('foo')
> del foo
> 
> leaves sockets open, there is a bug in bzr - file the bug report and
> marked it confirmed and high.
> 
> -Rob

I think I remember something about cyclic references for Branch objects
causing problems. I'm not sure what exact objects were triggering it,
but we do occasionally get cycles in our objects, and we haven't ever
spent much time to track them down (the don't matter much for the bzr
commandline client).

So you might try:
  import gc
  gc.collect()

(That returns the number of items collected.)

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmmq6AACgkQJdeBCYSNAAMA5QCdHYmfNuaKeQJRnN4Sar+qCCPd
LAYAoI8AyjlFeoIK7aGSK/N4+Me03DYy
=vk8W
-----END PGP SIGNATURE-----



More information about the bazaar mailing list