[Commented On] D11519: dirstate-v2: Initial Python serializer

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Fri Oct 1 09:23:54 UTC 2021


marmoute added a comment.
marmoute accepted this revision.


  Looks good, with a couple of nits.

INLINE COMMENTS

> v2.py:81
>              path_len,
> -            _basename_strat,
> +            _basename_start,
>              copy_source_start,

This should go in the previous changesets.

> v2.py:252-260
> +    tree_metadata = TREE_METADATA.pack(
> +        root_nodes_start,
> +        root_nodes_len,
> +        nodes_with_entry_count,
> +        nodes_with_copy_source_count,
> +        unreachable_bytes,
> +        unused,

This block should go in the `if len(map) ==0:` block

> v2.py:294
> +        current_node.children_count += 1
> +        # Entries from `map` are never `None`
> +        if entry.tracked:

This probably deserve that we check `any_tracked`¹ here.

[1] introduced in a parallel series

> v2.py:302
> +        next_path = None
> +        if index + 1 != len(sorted_map):
> +            # Determine if the next entry is in the same sub-tree, if so don't

can probably be a `<` for clarity.

REPOSITORY
  rHG Mercurial

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

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

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


More information about the Mercurial-patches mailing list