[MERGE] FileCollection

Robert Collins robertc at robertcollins.net
Tue Jul 17 11:03:44 BST 2007


On Tue, 2007-07-17 at 11:11 +1000, Martin Pool wrote:
> Adding such a utility could be good.
> 
> s/cand/can
> 
> FileCollection is not a very obvious name.  ListingFile?  FileListing?

NameList? 

Seems to me Names are the key thing.

> It seems odd that it talks about sequence and stores them in sequence
> but returns them as a set, in random order.

Oh, hmm. I'll rephrase that. I think this will need some tweaks shortly
to attach some minor metadata so that the repository code can setup the
index list in 'ideal' order - whatever that is...

> It seems like excessive policy to allocate the names as integers
> within this file.  Why not let the caller supply them?

Then the caller needs to ensure uniqueness. I have no use case for the
caller supplying the name

> +    def iter_files_recursive(self):
> +        Transport.iter_files_recursive(self)
> +
> 
> I'd like a comment in those two methods explaining that the default
> implementation raises an exception.

Sure.

> +    * New transport decorator 'unlistable+' which disables the list_dir
> +      functionality for testing.
> +
> 
> Take credit :)

Ok :).

-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: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070717/2e10f3f0/attachment.pgp 


More information about the bazaar mailing list