I have a Mercurial repository that I can see just fine if I navigate to it in a browser, but when I try to do a push, with my default path set to the same URL that I visit in th
We suddenly started getting this error on our main Mercurial repository, hosted under IIS on Windows 2008. When your repository has too many heads, Mercurial POSTs query strings longer than IIS chooses to handle.
You can tell by looking at the sub-status code of the failed request in the IIS logs (it's usually the number after the normal HTTP status code). In this situation, IIS returns a sub-status of 15 which means the query string is too long. Don't forget to check your sub-status codes!
To fix the issue, you'll need to increase IIS's maxiumum query string length:
# Get the current query string size limit
c:\windows\system32\inetsrv\appcmd list config /section:requestFiltering -text:requestLimits.maxQueryString
# Set the new query string size limit
c:\windows\system32\inetsrv\appcmd set config /section:requestFiltering /requestLimits.maxQueryString: