[PATCH 2 of 4 V2] verify: introduce a notion of "level"

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Apr 17 14:27:30 EDT 2019



On 4/17/19 8:04 PM, Martin von Zweigbergk wrote:
> 
> 
> On Wed, Apr 17, 2019 at 6:27 AM Pierre-Yves David 
> <pierre-yves.david at ens-lyon.org <mailto:pierre-yves.david at ens-lyon.org>> 
> wrote:
> 
> 
> 
>     On 4/17/19 3:18 PM, Martin von Zweigbergk wrote:
>      >
>      >
>      > On Wed, Apr 17, 2019, 03:49 Pierre-Yves David
>      > <pierre-yves.david at ens-lyon.org
>     <mailto:pierre-yves.david at ens-lyon.org>
>     <mailto:pierre-yves.david at ens-lyon.org
>     <mailto:pierre-yves.david at ens-lyon.org>>>
>      > wrote:
>      >
>      >     # HG changeset patch
>      >     # User Pierre-Yves David <pierre-yves.david at octobus.net
>     <mailto:pierre-yves.david at octobus.net>
>      >     <mailto:pierre-yves.david at octobus.net
>     <mailto:pierre-yves.david at octobus.net>>>
>      >     # Date 1555456341 -7200
>      >     #      Wed Apr 17 01:12:21 2019 +0200
>      >     # Node ID 55bd98999c25b10e220477fd4cc446a7c9c1f8ca
>      >     # Parent  f233cb63bc077267d8571378350d9563cbabcf3d
>      >     # EXP-Topic verify
>      >     # Available At https://bitbucket.org/octobus/mercurial-devel/
>      >     #              hg pull
>      > https://bitbucket.org/octobus/mercurial-devel/ -r 55bd98999c25
>      >     verify: introduce a notion of "level"
>      >
>      >
>      > I feel like this is unnecessarily complicated. It feels like just
>      > passing a boolean "full" would be enough. If one level has been
>     enough
>      > for over ten years, it seems likely that two levels will be
>     enough for
>      > many years ahead. Or do you plan to add more levels?
> 
>     I am planning to pass a "quick" mode that only check for stuff like
>     revlog size.
> 
> 
> What about the revlog size would it check?

Mostly the part of the checks that do basic sanity check to the revlog, 
without looking individual revisions: 
https://www.mercurial-scm.org/repo/hg/file/tip/mercurial/verify.py#l79

Only looking at revlog make the proces O(nbfiles) instead of 
O(nbfiles*nbrevs) The checks are also much cheaper

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list