title: Identify a URL as referring to a git or hg repository
body: <p>I'm developing a build tool which can import dependencies from various other locations. I want to support importing svn, git, and mercurial repositories by specifying the URL for the repository. Ideally, I want to be able to automatically identify what kind of repository an URL refers to by inspecting the response from the server. For instance, with SVN the response over HTTP is an XML document with root element <code>&lt;svn&gt;</code>.</p>
  
  <p>Is there a similar way that I can identify a repository as either git or mercurial based on the HTTP response? Either by inspecting the headers or the content?</p>