add operation discards hashcache stat information
Bug #146176 reported by
Martin Pool
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Martin Pool |
Bug Description
affects bzr
importance high
status inprogress
(supersedes bug 145511)
This sequence of operations:
bzr status
bzr add
bzr status
The second status operation reads and hashes every file, unnecessarily,
and so is slow. add shouldn't cause those stat values to be
invalidated.
This may likely be that DirState.
is discarding the working tree information.
If that's true there are two ways to fix it:
- change add to work on the tree, rather than converting to and from
an inventory (bug 146165)
- update this method to retain wt cached information
or both.
--
Martin Pool
To post a comment you must log in.
It isn't just add. I believe 'commit' does as well. Anything that has reason to "set_state_ from_inventory" . I originally thought "set_parent_trees" was also to blame, but it looks like that does not discard the stat information.
I think having a short-term fix of updating set_state_ from_inventory means that we will fix more than just 'bzr add' and it is worth doing.