[MERGE] Make {BzrDir,Repository}.find_branches a generator.

Andrew Bennetts andrew at canonical.com
Tue Apr 8 03:11:03 BST 2008


Robert Collins wrote:
> On Tue, 2008-04-08 at 11:39 +1000, Andrew Bennetts wrote:
> > This patch simply changes BzrDir.find_branches and Repository.find_branches to
> > be generators, rather than functions that return lists.  This allows the callers
> > to get incremental results.
> > 
> > I did this because I use “bzr merged-branches” (from
> > https://launchpad.net/bzr-removable).  This patch makes that command feel much
> > faster, because it starts giving output much much sooner.
> 
> I'm hesitant about the use of generators when we likely have uncompleted
> network IO underneath them. This plays badly with the smart server.
> 
> The command could be made much faster if it invoked an RPC method :P.

I'm running “bzr merged-branches” on a directory on local disk, so I don't think
RPC methods will help much :P

-Andrew.




More information about the bazaar mailing list