

Using Rust to generate Mercurial short-hash collisions - jordigh
http://www.jandemooij.nl/blog/2015/05/05/using-rust-to-generate-mercurial-short-hash-collisions/

======
jordigh
Heh, and he submitted a bug report about it:

[http://bz.selenic.com/show_bug.cgi?id=4649](http://bz.selenic.com/show_bug.cgi?id=4649)

I'm not quite sure what to do about this, because it takes about 10 million
commits before such collisions are likely to happen naturally, and it was a
conscious computation from the early Mercurial days that, "12 displayed hash
characters ought to be enough for everyone" (paraphrased).

It's not exactly a new revelation that this is a problem. It's even less of a
problem when most of the time you use tags, bookmarks, or revsets to refer to
commits, and like he says in the report, fixing this could incur a small
performance penalty while hg computes what the shortest unique prefix is on a
large repo.

------
madez
Why is it noteworthy that it was done using rust?

~~~
kibwen
Other than being a task that's inherently CPU-bound, not much. There's been a
lot of Mozillians itching to have any excuse to play with Rust lately. :P

