code like find_branches tries to open every file as bzrdir
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
(Initially posted to bzr ML but got no answer/feedback on this.)
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:/
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?
On Wed, 2011-05-11 at 10:55 +0000, Alexander Belchenko wrote: /bugs.launchpad .net/bugs/ 778318/ +attachment/ 2116045/ +files/ .bzr.log
> Public bug reported:
>
> (Initially posted to bzr ML but got no answer/feedback on this.)
>
> 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:/
>
> 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?
I think the find_branches() interface in general needs to be fixed - see
also bug 672016.
Cheers,
Jelmer