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

Robert Collins robertc at
Wed Mar 7 00:48:57 GMT 2007

On Tue, 2007-03-06 at 17:48 -0600, John Arbash Meinel wrote:
> 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).

Yes, I agree. So teaching commit to use a tree iterator which gives
current tree state automatically, would allow us to make commit simpler
still - possibly even removing the 'must have an inventory' constraint -
and that would rock with future repository iterations.


GPG key available at: <>.
-------------- 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 : 

More information about the bazaar mailing list