Mercurial > hg
diff hgext/gpg.py @ 50363:b4b1791f36e4 stable
repo-upgrade: write new requirement before upgrading the dirstate
This will prevent a small race condition where another hg process still
believes the repo is dirstate-v1 during the upgrade process.
This is good to have, but it is not a proper fix for the underlying problem.
There is code that assumes a requirement means a usage, e.g. having the
`generaldelta` requirement would imply *all* revlogs to use general delta,
but it's not true, it simply means that the repository advertises to the
client it needs to understand `generaldelta` in order to read the repo.
In the case of the dirstate, having the requirement *technically* should always
be the same as using dirstate-v2, since there is only one dirstate and
requirements should be as minimal as possible. However, we should not assume
this and make the code more robust in a future patch (series).
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Tue, 02 May 2023 15:40:13 +0200 |
parents | 46883d91e2b0 |
children | 181936ad069a |