Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
mercurial-devel
mercurial-devel
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 19
    • Merge Requests 19
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

This instance will be upgraded to the latest Heptapod 0.20rc on 2021-02-26 at 11:00 UTC+1

  • octobus
  • mercurial-develmercurial-devel
  • Merge Requests
  • !10

Open
Opened Dec 05, 2019 by Georges Racinet@gracinet🦑Owner
  • Report abuse
Report abuse

WIP: Rust nodemap

  • Overview 0
  • Commits 25
  • 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
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: octobus/mercurial-devel!10
Source branch: topic/default/rust-nodemap