Quickest Way to Validate a Repository URL

Jensen, Aaron ajensen at webmd.net
Tue Jun 10 18:45:08 UTC 2014


What's the quickest way to validate that a URL points to a Mercurial repository? Using the Mercurial commands, the best I could find was the id command:

    > hg id https://example.com

Is there a better/faster way?

Another approach would be to make a capabilities request:

    > curl https://example.com?cmd=capabilities

And check that it returned an HTTP 200 status.

Are there advantages/disadvantages to each? What approach is recommended?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20140610/3951bc66/attachment-0002.html>


More information about the Mercurial mailing list