[RFC] question about different behavior of WorkingTree.iter_changes

Alexander Belchenko bialix at ukr.net
Fri Apr 11 19:25:46 BST 2008


Aaron Bentley пишет:
> Alexander Belchenko wrote:
>> It's inevitable for me to use id2path for this cases because I need to know
>> file basename or at least its file extension.
> 
> I don't see why that follows; the basename is an attribute of inventory
> entries.  You don't need id2path to find out the basename.

*blink*

Can you point me to right place, please: what I should use instead id2path
if I'm only need basename? I obviously missing something. id2path is first
what I found out and I naively thought it's good enough for me.


> 
>>> Note that we are trying to avoid *ever* generating a full inventory, but
>>> if we do generate one, we cache it.  I suppose it's possible that you're
>>> doing something that invalidates the cache, but I think it's unlikely.
>> Actually I don't need full inventory, just mapping between file_id and
>> filenames
>> and vice versa.
> 
> You were worried that id2path might be generating full inventories every
> time.  I was trying to say that I think this is unlikely.

I understand your thought. I'm just missing the fact I have another option
in bzrlib to use instead of id2path.

But what about path2id? Actually it's not big deal if path2id will be slow,
because right now it's used only in WT2&3 supporting code (in HashCache).



More information about the bazaar mailing list