Search code examples
mercurialinternals

Mercurial repository internal format


Docs regarding repository format over at Mercurial site are scattered all over and refer to various legacy versions as well as current one and all in all aren't very detailed IMO.

Is there any comprehensive and up-to-date description of Mercurial repository format?

One Year Later

HgSharp: 100% binary-compatible Mercurial Core implemented in C#.


Solution

  • The Design page at least references the relevant wiki pages.
    It is indeed scattered, but it is listed in that page.

       .--------linkrev-------------.
       v                            |
    .---------.    .--------.    .--------.
    |changeset| .->|manifest| .->|file    |---.
    |index    | |  |index   | |  |index   |   |--.
    `---------' |  `--------' |  `--------'   |  |
        |       |      |      |     | `-------'  |
        V       |      V      |     V    `-------'
    .---------. |  .--------. |  .---------.
    |changeset|-'  |manifest|-'  |file     |
    |data     |    |data    |    |revision |
    `---------'    `--------'    `---------'