Mercurial > public > mercurial-scm > hg
comparison mercurial/configitems.py @ 48793:6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
The dual-write approach was mostly useless. As explained in the previous version
of the help, the key had to be read twice before we could cache a value.
However this "read twice" limitation actually also apply to any usage of the
key. If some operation wants to rely of the "same value == same tracked set"
property it would need to read the value before, and after running that
operation (or at least, after, in all cases). So it cannot be sure the operation
it did is "valid" until checking the key after the operation. As a resultat such
operation can only be read-only or rollbackable.
This reduce the utility of the "same value == same tracked set" a lot.
So it seems simpler to drop the double write and to update the documentation to
highlight that this file does not garantee race-free operation. As a result the
"key" is demoted to a "hint".
Documentation is updated accordingly.
Differential Revision: https://phab.mercurial-scm.org/D12201
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 17 Feb 2022 07:34:49 +0100 |
parents | 8bbb1abb9d19 |
children | 6000f5b25c9b 8653a2a33736 |
comparison
equal
deleted
inserted
replaced
48792:8bbb1abb9d19 | 48793:6e559391f96e |
---|---|
1277 experimental=True, | 1277 experimental=True, |
1278 alias=[(b'format', b'exp-rc-dirstate-v2')], | 1278 alias=[(b'format', b'exp-rc-dirstate-v2')], |
1279 ) | 1279 ) |
1280 coreconfigitem( | 1280 coreconfigitem( |
1281 b'format', | 1281 b'format', |
1282 b'use-dirstate-tracked-key', | 1282 b'use-dirstate-tracked-hint', |
1283 default=False, | 1283 default=False, |
1284 experimental=True, | 1284 experimental=True, |
1285 ) | 1285 ) |
1286 coreconfigitem( | 1286 coreconfigitem( |
1287 b'format', | 1287 b'format', |
1288 b'use-dirstate-tracked-key.version', | 1288 b'use-dirstate-tracked-hint.version', |
1289 default=1, | 1289 default=1, |
1290 experimental=True, | 1290 experimental=True, |
1291 ) | 1291 ) |
1292 coreconfigitem( | 1292 coreconfigitem( |
1293 b'format', | 1293 b'format', |