Mercurial > hg
comparison tests/test-status.t @ 47352:9d58e54b5966
dirstate-v2: Drop parent directory cache when removing a dirstate node
The premise of the directory cache is that the dirstate contains child nodes
for every entry that `read_dir` would return. When removing nodes, that may
not be the case anymore so the cache should be invalidated.
Differential Revision: https://phab.mercurial-scm.org/D10829
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Tue, 01 Jun 2021 16:55:59 +0200 |
parents | 3b9914b28133 |
children | 284a20269a97 |
comparison
equal
deleted
inserted
replaced
47351:3b9914b28133 | 47352:9d58e54b5966 |
---|---|
955 | 955 |
956 $ touch subdir/unknown | 956 $ touch subdir/unknown |
957 $ hg status | 957 $ hg status |
958 ? subdir/unknown | 958 ? subdir/unknown |
959 | 959 |
960 $ rm subdir/unknown | |
961 $ hg status | |
962 | |
963 Removing a node from the dirstate resets the cache for its parent directory | |
964 | |
965 $ hg forget subdir/a | |
966 $ hg debugdirstate --dirs --no-dates | grep '^d' | |
967 d 0 0 set subdir | |
968 $ hg ci -qm '#1' | |
969 $ hg debugdirstate --dirs --no-dates | grep '^d' | |
970 d 0 0 unset subdir | |
971 $ hg status | |
972 ? subdir/a | |
973 | |
960 #endif | 974 #endif |