# HG changeset patch # User Arseniy Alekseyev # Date 1663875267 14400 # Node ID 557f7e243ac9b5400d2dd5db3bf1b44a56731669 # Parent 1994842955dbf2f3201aeb0a555a5c459f8e458e rhg: show a bug where repeated [hg status] is needed to cache everything diff -r 1994842955db -r 557f7e243ac9 tests/test-status.t --- a/tests/test-status.t Fri Nov 04 16:15:12 2022 -0400 +++ b/tests/test-status.t Thu Sep 22 15:34:27 2022 -0400 @@ -944,7 +944,7 @@ $ hg debugdirstate --all --no-dates | grep '^ ' 0 -1 unset subdir -Now the directory is eligible for caching, so its mtime is save in the dirstate +Now the directory is eligible for caching, so its mtime is saved in the dirstate $ rm subdir/unknown $ sleep 0.1 # ensure the kernel’s internal clock for mtimes has ticked @@ -976,4 +976,35 @@ $ hg status ? subdir/a +Changing the hgignore rules makes us recompute the status (and rewrite the dirstate). + + $ rm subdir/a + $ mkdir another-subdir + $ touch another-subdir/something-else + + $ cat > "$TESTDIR"/extra-hgignore < something-else + > EOF + + $ hg status --config ui.ignore.global="$TESTDIR"/extra-hgignore + $ hg debugdirstate --all --no-dates | grep '^ ' + 0 -1 set subdir + + $ hg status + ? another-subdir/something-else + + $ hg debugdirstate --all --no-dates | grep '^ ' + 0 -1 unset subdir (known-bad-output !) + +For some reason the first [status] is not enough to save the updated +directory mtime into the cache. The second invocation does it. +The first call only clears the directory cache by marking the directories +as "outdated", which seems like a bug. + + $ hg status + ? another-subdir/something-else + + $ hg debugdirstate --all --no-dates | grep '^ ' + 0 -1 set subdir + #endif