[MERGE] Add current-directory information to osutils.walkdirs

Robert Collins robertc at robertcollins.net
Mon Jul 31 00:29:37 BST 2006

On Sun, 2006-07-30 at 15:17 -0500, John Arbash Meinel wrote:
> With this code, 'top' and 'prefix' are always are either empty, or end
> in a slash, so we don't need to do one of the additions, and we don't
> need the if/then.
> I also think we might want to change the function from using
> os.listdir() to using 'read_dir()' which hasn't been integrated into
> the
> core of bzr (not even the python version).
> Then when we have the extension available, walkdirs() doesn't even
> have
> to stat every file.
> Just a couple thoughts.
> So even if you don't want to rework walkdirs just yet, I think we
> should
> clarify the documentation.
> Otherwise I'm +1 to how you changed the 'yield' value.

Thanks, I'll correct the glitches you noted. I think we can optimise it
further, though I'll defer tweaking the core loop just now. I'd love to
get my readdirs branch integrated, which has the python version based on
listdir and the C version too. But... the interface we expose is
walkdirs, so for now I think its more productive to build walkdirs up
into something that is used through the code base, with the
understanding in its contract that stat is optional. I'll add that to
the docstring in fact.

GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060731/6af05aea/attachment.pgp 

More information about the bazaar mailing list