4 ms·
Abstractly, it's exactly the same as git. Commit → File tree → File data blob. The underlying data structures used are different, but considered an internal de
by Zash 8y ago
Abstractly, it's exactly the same as git. Commit → File tree → File data blob.
The underlying data structures used are different, but considered an internal detail, so could be changed in the future.
Today, most data is stored in a "revlog", where data can be either be stored (compressed) directly or stored as a (compressed) delta against an earlier version. Deltas may be chained. The index consists of fixed size records, which gives fast lookups, which are also linked to global revision numbers so that you can eg quickly find the commit based on a specific file change.
Obs: This is based on attempting to re-implement the basics of Mercurial from scratch.