You know that sinking feeling when your internal developer portal shows a repo link that leads straight into a permission denied wall? That’s where Backstage Mercurial earns its keep. It connects your cataloged services in Backstage to your Mercurial repositories so your metadata, docs, and code stay aligned instead of drifting into chaos.
Backstage, built by Spotify, organizes everything your engineers build. Mercurial, the old but very much alive version control system, handles source history with speed and resilience. Marrying the two lets a team surface code insights, contributors, and service details without jumping between tools. It is a bridge between your service catalog and your source of truth.
How the Integration Works
At a high level, Backstage calls the Mercurial API to retrieve repository metadata, commit logs, and contributor info. Access policies sit on top, governed by your identity provider, usually through OIDC or SAML integrations like Okta or Azure AD. Each request checks who you are and what you can see before anything leaves the repo. The result feels native: team pages showing live README data, dependency graphs that actually update, and code references that always resolve.
Authentication matters most here. Use short-lived tokens or identity-aware proxies that mint session-limited credentials. Keep repo access keys out of Backstage configs entirely. If your Backstage deployment runs on Kubernetes, bind access through a dedicated service account and rotate its secrets frequently. The payoff is cleaner audit logs and zero blind spots.
Benefits of Linking Backstage and Mercurial
- Real-time visibility across source and service metadata
- Automated auditing through existing identity providers and IAM policies
- Less repo chasing, more time coding
- Inherently safer because repo credentials never touch user space
- Clear ownership and reduced onboarding friction for new engineers
Developers notice the difference fast. Code reviews open from the same interface they use for service docs. No more tab hell or forgotten logins. The integration also shortens the feedback loop when debugging production issues because doc, ownership, and code history line up in one view. That’s genuine developer velocity.