[RFC] walkdirs skip api
Robert Collins
robertc at robertcollins.net
Wed Aug 16 03:14:31 BST 2006
Hi,
I've figured out what I think is a reasonable API for skipping dirs
with walkdirs.
Currently we do a del on the dirblock to remove things we dont want to
iterate over. This is somewhat expensive, and very expensive when we try
to stack walkdirs - as we do in WorkingTree.walkdirs (we stack walking a
RevisionTree and the osutils.walkdirs together to show
versioned/unversioned file state etc).
I propose the following:
walkdirs() will return a Walker object which has two methods:
walk()
skip(basename)
walk() will return the current generator
skip(basename) will schedule basename to be skipped when next() is
invoked on the generator.
How does that sounds ?
-Rob
--
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/20060816/152cddbb/attachment.pgp
More information about the bazaar
mailing list