Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mercurial-devel-native-test mercurial-devel-native-test
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 12
    • Issues 12
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

April 05-07 - Mercurial Paris Conference 2023 - One day of workshop dedicated to Heptapod and Mercurial usage and workflow. There are still places available for both workshops and talks!

  • heptapodheptapod
  • Testing Projects
  • mercurial-devel-native-testmercurial-devel-native-test
  • Merge requests
  • !10

WIP: Rust nodemap

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Raphaël Gomès requested to merge topic/default/rust-nodemap into branch/default Dec 05, 2019
  • Overview 0
  • Commits 25
  • Pipelines 0
  • Changes 15

A first actually working version of a nodemap implemented in Rust with an append-only variant of the same 16-radix trie as in revlog.c, packed in the rustext.revlog.MixedIndex class, to instantiate with the C index.

Currently activated by the presence of the HGRUSTINDEX environment variable. It passes all the tests for me. It has the methods required for serialization by the Python layer:

  • can be instantiated on anything implementing the buffer protocal for bytes (including mmap): MixedIndex(c_idx, data, datalen)
  • can return a ready to write dump all its mutable data as a bunch of bytes ready to be appended to the existing cache
  • pack / vacuum logic can for the time being be done this way:
c_index = MixedIndex.get_cindex()
packer = MixedIndex(c_index, None, 0)
packer._fill_nodemap()
with open(nodemap_fpath, 'wb') as fobj:  
    fobj.write(packer.nodemap_writeable())

(of course that example is oversimplified, one would need vfs, locks, perform an atomic rewrite etc, but that's not the point).

Obviously not ready for submission. Lots of squashing / resplitting and clarification of implementation, API etc, but it passes the whole test suite for me with Python 2.7

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: topic/default/rust-nodemap