The alert hit at 02:13. Build pipelines stalled. Repos locked. Engineers pulled from sleep into the fog of a Mercurial incident.
Mercurial incident response is about speed without panic. It starts by stopping the spread of corruption or loss. Lock writes. Freeze deployments. Clone the affected repository to a secure location for analysis. Every minute matters.
Check integrity with hg verify. If the output flags missing or damaged revlogs, catalog them. Document every finding in real time. This becomes your timeline and your proof. Pull server logs, especially around push and pull requests. Compare hashes across replicas and offsite backups. If something doesn’t match, you have your first concrete lead.
Identify the blast radius. Is this one repo or many? Is it tied to a single user credential, a misconfigured hook, or a compromised CI job? Audit user access immediately. Rotate tokens and passwords. Remove any stale accounts.