dirstate inventory after an add loses SHAs

Ian Clatworthy ian.clatworthy at internode.on.net
Fri Sep 7 13:41:02 BST 2007

I'm profiling some new code that uses iter_changes as the main commit
loop and I'm seeing something I'm not expecting. After a file is added
and 'bzr add' is run, every file gets a cache miss and needs it's SHA
caclulated again in dirstate.update_entry().

I've been avoiding the dirstate code until now but it looks like the
time has come for me to dive into it. It's look like the smart_add()
code on mutuabletree is assuming an old-style inventory and maybe
calling write_inventory(inv) on workingtree4 is causing the problem?

Any tips on where to start looking from the dirstate gurus?

Ian C.

More information about the bazaar mailing list