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

Gary van der Merwe garyvdm at gmail.com
Tue Feb 24 22:20:03 GMT 2009


On Tue, Feb 24, 2009 at 11:46 PM, Nicholas Allen
<nick.allen at onlinehome.de> wrote:
> Hi,
>
> In my bzr-email-notifier tool I do the following:
>
> try:
>                    parent_location = branch.get_parent()
>
>                    if not parent_location is None:
>                        parent_branch = Branch.open(parent_location)
>                        branch.pull(parent_branch)
>                except BzrError, e:
>                    print >>sys.stderr, \
>                            'Could not pull from parent for branch %s:
> %s' % (branch_emailer.path, e)
>
>
> Do I need to do something to close the parent branch after I am finished
> with it? I can't find a close method on Branch. I notice that after a
> while I run out of sockets on my server so I guess open is keeping a
> socket open even after the parent branch (which is remote) is no longer
> needed.

I far as I am aware, you don't have do anything, provided you have not
opened any locks in your code.



More information about the bazaar mailing list