Skip to content

fix: recognize Mercurial repositories over HTTP - #184

Open
MentalOfCrow wants to merge 1 commit into
publiccodeyml:mainfrom
MentalOfCrow:codex/validate-mercurial-repositories
Open

MentalOfCrow wants to merge 1 commit into
publiccodeyml:mainfrom
MentalOfCrow:codex/validate-mercurial-repositories

Conversation

@MentalOfCrow

Copy link
Copy Markdown
Contributor

Closes #137.

When the existing repository check does not recognize a URL, try Mercurial's HTTP capabilities handshake and require the protocol response media type. Reuse the parser's HTTP client and request context so its network policy still applies. The probe preserves the URL path and existing query parameters.

The regression tests reproduce the issue against a local test server and cover ordinary web pages and failed responses. The whole suite, go vet, and CLI fixture validation passed on Linux with Go 1.26.11. The Mercurial and parser network-policy tests also passed with the race detector on Windows.

Protocol reference: https://lists.mercurial-scm.org/pipermail/mercurial-devel/2018-February/110854.html

Codex assisted with the implementation and verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Mercurial repositories

1 participant