D7835: nodemap: write nodemap data on disk

2020-01-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Let us start writing data on disk (so that we can read it from there later). This series of changeset is going to focus first o

D7834: nodemap: have some python code serializing a nodemap

2020-01-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This python code aims to be as "simple" as possible. It is a reference implementation of the data we are going to serialize on disk (and possibly, lat

D7836: nodemap: add a function to read the data from disk

2020-01-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This changeset is small and mostly an excuse to introduce an API function reading the data from disk. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.

D7839: nodemap: deleted older raw data file when creating a new ones

2020-01-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY When we write new full files, it replace an older one with a different name. We add the associated cleanup for the older file to be removed after the transacti

D7838: nodemap: use an intermediate "docket" file to carry small metadata

2020-01-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This intermediate file will make mmapping, transaction and content validation easier. (Most of this usefulness will arrive gradually in later changeset). See i

D7837: nodemap: only use persistent nodemap for non-inlined revlog

2020-01-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Revlog are inlined while they are small (to avoid having too many file to deal with). The persistent nodemap will only provides

D7830: revlog: reorder a conditionnal about revlogio

2020-01-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY if we are using REVLOGV0, we will not use a rust based index. This small line movement make it clearer. REPOSITORY rHG Mercu

D7833: transaction: allow finalizer to add finalizer

2020-01-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It will make some code (persistent nodemap related) simpler to write, because higher level code can blindly queue finalization without thinking too hard about

D7832: transaction: add a `hasfinalize` method

2020-01-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The method allow code to check if an existing callback exists. It allow them to skip potentially expensive setup for a callback. REPOSITORY rHG Mercurial REV

D7831: changelog: fix the diverted opener to accept more kwargs

2020-01-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The current code prevent the use of `atomictemp` file with the changelog opener. I do not see a good reason for this limitation. REPOSITORY rHG Mercurial REVI