Tree.iter_entries_by_dir - should it check disk status for mutable trees?

John Arbash Meinel john at arbash-meinel.com
Tue Mar 6 23:48:08 GMT 2007


Robert Collins wrote:
> Currently it returns solely whats in the inventory, which means its not
> an accurate view of reality.
> 
> Rather than provide a cogent argument for or against right now, I
> thought I'd just raise the question, and when I have more time give
> something detailed, if noone else has commented by then.
> 
> -Rob

I generally feel like MutableTrees are intended to be defined as their
current contents, and the saved inventory/dirstate is just the best
approximation to that value.

So I would have it return the entries on disk. (in dirstate terms, it
should call 'update_entry' before yielding anything).

I think we have some semi-gross hacks in the codebase to workaround our
current state. (InventoryEntry._read_tree_state which has been a source
of repeated stat'ing of the same file).

John
=:->



More information about the bazaar mailing list