D7834: nodemap: have some python code serializing a nodemap

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Thu Jan 16 16:52:21 EST 2020


marmoute added inline comments.

INLINE COMMENTS

> martinvonz wrote in nodemap.py:112-118
> Would it work to replace these lines by the following?
> 
>   new = {}
>   block[_to_int(current_hex[level])] = new
>   _insert_into_block(index, level + 1, new, other_rev, other_hex)
>   _insert_into_block(index, level + 1, new, current_rev, current_hex)

no, we need the value of block to be updated after each iteration otherwise the next iteration would not descend to the level it just created.

REPOSITORY
  rHG Mercurial

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

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

To: marmoute, #hg-reviewers, martinvonz
Cc: martinvonz, mjpieters, mercurial-devel


More information about the Mercurial-devel mailing list