comparison tests/test-status.t @ 49555:8ee3889bab92 stable

rust-status: save new dircache even if just invalidated There was a functional race between invalidating the cache (not acted upon until the end of the status algorithm) and populating the new cache (which relies upon an up-to-date version of the cache). We simply inform the cache populating function that we've just invalidated the cache for this particular directory since the information is present in the same scope.
author Raphaël Gomès <rgomes@octobus.net>
date Wed, 19 Oct 2022 16:28:41 +0200
parents 557f7e243ac9
children 2af928d69e8e
comparison
equal deleted inserted replaced
49554:ecf9788cd9c4 49555:8ee3889bab92
991 0 -1 set subdir 991 0 -1 set subdir
992 992
993 $ hg status 993 $ hg status
994 ? another-subdir/something-else 994 ? another-subdir/something-else
995 995
996 $ hg debugdirstate --all --no-dates | grep '^ ' 996 One invocation of status is enough to populate the cache even if it's invalidated
997 0 -1 unset subdir (known-bad-output !) 997 in the same run.
998
999 For some reason the first [status] is not enough to save the updated
1000 directory mtime into the cache. The second invocation does it.
1001 The first call only clears the directory cache by marking the directories
1002 as "outdated", which seems like a bug.
1003
1004 $ hg status
1005 ? another-subdir/something-else
1006 998
1007 $ hg debugdirstate --all --no-dates | grep '^ ' 999 $ hg debugdirstate --all --no-dates | grep '^ '
1008 0 -1 set subdir 1000 0 -1 set subdir
1009 1001
1010 #endif 1002 #endif