3 ms·
Yes, as it uses a similar hashing scheme as git. https://www.mercurial-scm.org/wiki/FAQ#FAQ.2FTechnicalDetails.What_about_hash_collisions.3F_What_about_weakness
by tonfa 10y ago
Yes, as it uses a similar hashing scheme as git.
https://www.mercurial-scm.org/wiki/FAQ#FAQ.2FTechnicalDetails.What_about_hash_collisions.3F_What_about_weaknesses_in_SHA1.3F https://www.mercurial-scm.org/wiki/FAQ#FAQ.2FTechnicalDetail...
That said the file format was switched pretty early on (2006 I think, less than a year after initial release) to reserve space for 32 bytes instead of 20 for the hash, thus allowing hash migration more easily (sha1 is 20 bytes, sha2 which at the time was the obvious replacement was 32 bytes).
https://www.mercurial-scm.org/wiki/RevlogNG https://www.mercurial-scm.org/wiki/RevlogNG
- glandium 10y agoExcept all exchanges between mercurial client and server happen with changegroups and changegroups are still limited to 20 bytes for the hash.