[MERGE REQUEST] Couple of small fixes

Jelmer Vernooij jelmer at samba.org
Thu Dec 15 10:41:12 GMT 2005


Hi Robert,

Thanks for your comments. I'll fix the issues you mentioned, not sure
about one thing though (see below).

On Thu, Dec 15, 2005 at 02:04:48PM +1100, Robert Collins wrote about 'Re: [MERGE REQUEST] Couple of small fixes':
> On Fri, 2005-12-09 at 02:21 +0100, Jelmer Vernooij wrote:
> >              try:
> > -                return BzrBranch(t), t.relpath(url)
> > +                return bt.open_containing(url)
> >              except NotBranchError:
> >                  pass
> > -            new_t = t.clone('..')
> > -            if new_t.base == t.base:
> > -                # reached the root, whatever that may be
> > -                raise NotBranchError(path=url)
> > -            t = new_t
> > +        
> > +        raise NotBranchError(path=url)
> I'm concerned about the above changes. This makes opening of containing
> branches -much- slower. I think that requiring transport be acceptable
> to all Branches is a reasonable requirement. If someone has a
> ForeignBranch on SVN at a http:// location, they should teach the Http
> transport to understand that, or just use ignore the transport in their
> branch.
I don't really see how this makes opening containing branches slower.

There are two approaches that can used for 'open_containing': 
depth-first and breadth-first search for a Branch. I've implemented
depth-first search because it does not make opening bzr branches
slower even if you have a several foreign branch classes loaded (since
it will try Bzr first).

The code you are looking at here which searches for a .bzr branch by going down one level at a time was previously in Branch.open_containing. I moved it to 
BzrBranch since not all derived classes of Branch may be using Transport.

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051215/7a31323a/attachment.pgp 


More information about the bazaar mailing list