[Commented On] D11089: dirstate-v2: Enforce data size read from the docket file

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Fri Jul 16 09:53:14 UTC 2021


marmoute added a comment.


  Either I am missing something or we could so something much simpler here.

INLINE COMMENTS

> dirstatemap.py:639-644
>                      data = self._opener.read(self.docket.data_filename())
>                  else:
>                      data = b''
> -                self._rustmap = rustmod.DirstateMap.new_v2(data)
> +                self._rustmap = rustmod.DirstateMap.new_v2(
> +                    data, self.docket.data_size
> +                )

Why dont' we simply ready `docket.data_size` data from disk ? instead of doing later filtering ?

REPOSITORY
  rHG Mercurial

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11089/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D11089

To: SimonSapin, #hg-reviewers, Alphare
Cc: marmoute, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210716/b511a9bb/attachment-0002.html>


More information about the Mercurial-patches mailing list