[brisbane-core MERGE] CHKInventory.iter_non_root_entries()

Ian Clatworthy ian.clatworthy at internode.on.net
Fri Mar 6 21:25:15 GMT 2009


Aaron Bentley wrote:
> Ian Clatworthy wrote:
>> It seems that operations that walk directories in CHKInventories
>> are slow, e.g. directories() and iter_changes(). As it turns out
>> though, I don't *need* the path returned by iter_changes() in
>> fast-import - just the inventories entries while loading texts.
> 
> Okay, but why skip the root entry?  Aren't we trying to stop treating
> the root entry as special?

The current user of the API - loading texts during a commit - doesn't
want it so it does simplify the calling code not returning it. I don't
really mind either way though - I was mostly reimplementing the entries()
API without the path bit. My original cut at this gave entries() an
include-path=True parameter but that didn't turn out because the client
code wanted an iterator, not list.

I'm happy to go with whatever API name and behaviour you recommend.

Ian C.



More information about the bazaar mailing list