This extension gives a list of the files the most susceptible to contains issues in the repository based on their history.
This extension is not distributed with Mercurial.
This extension adds a command hotfiles that displays the ten files the most likely candidates to contain issues. This calculation is done regarding the history of the files, and summing the time they have been modified in a bug-fixing commit in the past time.
Configure your .hgrc to enable the extension by adding following lines:
[extensions] hotfiles = /path/to/hotfiles.py
If your commit mesages includes an indication that they are related to an issue, you can limit the calculation on those commits by introducing the following configuration item:
[hotfiles] pattern = issue\d+