Mercurial > hg
diff tests/test-dirstate-version-fallback.t @ 50723:bfbd84c57bda stable
dirstate-v2: actually fix the dirstate-v2 upgrade race
It looks like the previous fix for the dirstate-v2 upgrade race didn't work.
The problem is that it only recovers in case the size of the v1 `dirstate` file
is smaller than the `v2` one, whereas in real life it's always larger.
This commit changes the test to be more realistic, which reveals the crash,
and changes the code to fix the crash.
author | Arseniy Alekseyev <aalekseyev@janestreet.com> |
---|---|
date | Mon, 26 Jun 2023 11:21:43 +0100 |
parents | a41eeb877d07 |
children | 7e5be4a7cda7 |
line wrap: on
line diff
--- a/tests/test-dirstate-version-fallback.t Thu Jun 22 14:24:45 2023 +0200 +++ b/tests/test-dirstate-version-fallback.t Mon Jun 26 11:21:43 2023 +0100 @@ -10,8 +10,8 @@ $ hg init repo $ cd repo $ echo a > a - $ hg add a - $ hg commit -m a + $ touch file-with-somewhat-long-name-to-make-dirstate-v1-bigger-than-v2 + $ hg commit -Aqm a $ hg debugrequires | grep dirstate [1] $ ls -1 .hg/dirstate*