bug? find_branches or find_bzrdir tries to open all files as bzr locations

Jelmer Vernooij jelmer at samba.org
Thu May 12 08:23:43 UTC 2011


On Thu, 2011-05-12 at 10:01 +0200, Martin Pool wrote:
> On 6 May 2011 22:05, Alexander Belchenko <bialix at ukr.net> wrote:
> > I think this is genuine bug in bzrdir search algorithm or maybe in
> > find_branches code, but: the latter tries to open every directory and
> > *every* plain file as bzrdir object. I suppose the original intent was
> > open_bzrdir always search directories upwards, but find_branches have
> > to search downwards but it never take care about skipping plain files.
> >
> > This can be seen with bzr-svn plugin installed because it reports
> > about every failed attempt to open location as svn tree, see for
> > example attachment for recent bug
> > https://bugs.launchpad.net/bugs/778318/+attachment/2116045/+files/.bzr.log
> >
> > Is it really bug as I think or bzrdir name does not implies it should
> > be dir only and should support files too? Do you think it should skip
> > files and check directories only? Dp ypu think current behavior have
> > some performance penalties because it doing too much useless work?
> 
> That does indeed seem like a bug and a potential performance problem.
> I wonder if it is partly due to us not being able to identify
> directories ahead of time on all transports.  Please at least file a
> bug for it, or if you like have a dig into whether we could avoid it.
There is also bug 672016, which is about some performance problems using
find_branches() on Subversion repositories.

I think the find_branches() API in general could be simplified a bit and
fixed to perform.

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20110512/0b99cde9/attachment-0001.pgp>


More information about the bazaar mailing list