Original Mercurial DVCS Paper

Created on 2023-05-11T18:24:19-05:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

Revlog: a haystack style append-only log. Full revisions and deltas are appended to the end of the files.

Deltas: a collection of chunks. Each chunk has a start and stop point which is to be sliced out of the original file. The slice then has its contents replaced with the given payload.

Revlog index: maps each version of a file to a position within a revlog.

Uses bdiff because it has the simplest implementation and works reasonably on text.

Each file gets its own revlog and index. Then a "manifest" lists all files in the project and their revision (in their own revlogs.) Changes to this manifest file are what make up the "change sets."

Writing files involves computing diffs, injecting those to a revlog, writing the position in the revlog index, updating the manifest with the new IDs, then pushing a new version of the manifest (this part is called the "change set.")