This is basically the equivalent of
JENKINS-13410 for the Mercurial plugin.
If I set the repo URL to something on the lines of https://user:pass@url/repo, if I use the notifyCommit hook provided since 1.38 I get a "No mercurial jobs found" message from the server.
Command line is:
$ curl https://jenkins/mercurial/notifyCommit?url=https://user:pass@url/repo (copy pasted from the actual URL in the job setup)