Advertise hg client capabilities to hg server

Gregory Szorc gregory.szorc at
Tue Jan 28 11:29:12 CST 2014

I like where you're coming from!

Please read my similar post that touches on this:

I haven't had the cycles to continue with that work, unfortunately.

On 1/28/14, 12:37 AM, Anton Gogolev wrote:
> Hi,
> I'm entertaining the idea of how useful would it be for hg server to know
> a thing or two about the client that is connecting to it. More
> specifically, things I think could be useful to know on the server-side
> include:
>   * Client version
>   * Enabled extensions
>   * Platform
>   * ...and something else
> How I see this implemented is either by including all this information in
> a User-Agent string or in some kind of X-HG-CLIENT header or combination
> thereof:
>   GET http://host?cmd=capabilities HTTP/1.1
>   Accept-Encoding: identity
>   Accept: application/mercurial-0.1
>   User-Agent: mercurial/proto-2.8.2
>   X-Hg-Client: extensions=largefiles,projrc,convert,page,rebase,mq;
>     platform=windows;
> I don't know what are the implications of bumping version number in
> "User-Agent: mercurial/proto-1.0", probably somebody can chime in
> and destroy this whole idea.
> How can this be useful, you ask? For one, this would allow server to
> enforce a client to enable specific extensions (like projrc, which is
> useful in a corporate environment) or warn about outdated version or
> possible problems with repository on a local machine (when cloning a
> repository created on a case-sensitive file system to a Windows machine).
> This might introduce slight security problems with exposing a list of
> enabled extensions to the server, but this can be solved with a client-
> side configuration knob, which would default to existing, "anonymous"
> behavior.
> What do you think of that?
> Thanks,
> Anton.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at

More information about the Mercurial-devel mailing list