Advertise hg client capabilities to hg server
anton.gogolev at gmail.com
Tue Jan 28 02:37:11 CST 2014
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
* Client version
* Enabled extensions
* ...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
GET http://host?cmd=capabilities HTTP/1.1
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"
What do you think of that?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mercurial-devel