Mercurial > public > mercurial-scm > hg-stable
diff tests/test-persistent-nodemap.t @ 44370:8374b69aef75
nodemap: track the total and unused amount of data in the rawdata file
We need to keep that information around:
* total data will allow transaction to start appending new information without
confusing other reader.
* unused data will allow to detect when we should regenerate new rawdata file.
Differential Revision: https://phab.mercurial-scm.org/D7889
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 15 Jan 2020 15:50:24 +0100 |
parents | e41a164db7a9 |
children | f7459da77f23 |
line wrap: on
line diff
--- a/tests/test-persistent-nodemap.t Wed Jan 15 15:50:14 2020 +0100 +++ b/tests/test-persistent-nodemap.t Wed Jan 15 15:50:24 2020 +0100 @@ -15,8 +15,10 @@ $ hg debugnodemap --metadata uid: ???????????????? (glob) tip-rev: 5000 + data-length: 122880 + data-unused: 0 $ f --size .hg/store/00changelog.n - .hg/store/00changelog.n: size=26 + .hg/store/00changelog.n: size=42 $ f --sha256 .hg/store/00changelog-*.nd .hg/store/00changelog-????????????????.nd: sha256=b961925120e1c9bc345c199b2cc442abc477029fdece37ef9d99cbe59c0558b7 (glob) $ hg debugnodemap --dump-new | f --sha256 --size @@ -50,11 +52,22 @@ $ echo foo > foo $ hg add foo $ hg ci -m 'foo' + +#if pure $ hg debugnodemap --metadata uid: ???????????????? (glob) tip-rev: 5001 + data-length: 123072 + data-unused: 192 +#else + $ hg debugnodemap --metadata + uid: ???????????????? (glob) + tip-rev: 5001 + data-length: 122880 + data-unused: 0 +#endif $ f --size .hg/store/00changelog.n - .hg/store/00changelog.n: size=26 + .hg/store/00changelog.n: size=42 (The pure code use the debug code that perform incremental update, the C code reencode from scratch)