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

Nicholas Allen nick.allen at
Wed Feb 25 12:14:59 GMT 2009

Hash: SHA1

Vincent Ladeuil wrote:
>>>>>> "Nicholas" == Nicholas Allen <nick.allen at> writes:
>     Nicholas> You may encounter some variation of the problem but it's hard to
>     >> tell without a high level description of what your code is doing.
>     >> 
>     >> Are you polling the branches ? 
>     Nicholas> Yes. My code looks like this:
>     Nicholas>      for branch_emailer in branch_emailers.values():
>     Nicholas>             branch = branch_emailer._branch
> So all those _branch are kept alive right ?
> Where are they coming from ? 

They are opened once only. As long as there is a branch below the
directory being scanned it will remain open.

> Did they already connect to a server ?

Those branches are all local. The problem only happens when I pull from
the parent (which is remote).

>     >> 
>     >> If that's the case, you may want to look at the
>     >> possible_transports parameter in
>     >> 
> That was the important point. Did you look at it ?

Yes but there was no documentation for it so I didn't understand its

> It allows you to manage your own set of opened connections via
> the transport objects.
> A trivial implementation could be to do:
> my_transports = []
> and then
> parent_branch =, possible_transports=my_transports)
> Each new transport will then be added.
> If you do that right you should have no more opened sockets than
> len(my_transports).

I will try your suggestion and see if that helps...


Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


More information about the bazaar mailing list