[RFC] question about different behavior of WorkingTree.iter_changes

Aaron Bentley aaron at aaronbentley.com
Fri Apr 11 22:04:02 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> 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?

InventoryEntry.name

It's also available on dirstate entries as "entry[0][1]".

> 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).

Also preferable to avoid path2id.  If paths2ids is good enough for you,
use that.  Generally, the multiple-result operations are more efficient
than the single-result operations.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH/9JC0F+nu1YWqI0RAn0EAJ91EwO04gdLDTfOiaY3cbYc2KSdYQCfYSo9
zPEM3OX1IIGQxjr1C80Rplc=
=nLQD
-----END PGP SIGNATURE-----



More information about the bazaar mailing list