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

Martin Pool mbp at canonical.com
Thu May 12 08:01:01 UTC 2011


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.

Martin



More information about the bazaar mailing list