How can I, on a Mercurial repository server, figure out the current repository URL or at least name (subpath) in a changegroup
— or somewhat equivalent — hook? I'm running HgWeb on IIS.
$HG_URL
returns the push
ers URL, not the receiving repository's. $HG_SOURCE
only returns serve
.
Context: I'm trying to write a changegroup
hook for Jenkins using /mercurial/notifyCommit?url=<url>
that tells Jenkins to perform an SCM poll, and if I can't get this to work, I have to do about 50 cURL calls (once for every repository on the server) on every changegroup
trigger, and then remember to maintain this list in hgweb.config
for all eternity.