Commit Graph

4 Commits

Author SHA1 Message Date
Mads Kiilerich
8415df7277 tests: use 'hghave serve' to guard tests that requires serve daemon management 2011-11-07 03:24:53 +01:00
Matt Mackall
89ec131e91 http: minor tweaks to long arg handling
x-arg -> x-hgarg
replace itertools.count(1)
2011-05-01 03:51:04 -05:00
Steven Brown
c1075f3880 httprepo: long arguments support (issue2126)
Send the command arguments in the HTTP headers. The command is still part
of the URL. If the server does not have the 'httpheader' capability, the
client will send the command arguments in the URL as it did previously.

Web servers typically allow more data to be placed within the headers than
in the URL, so this approach will:
- Avoid HTTP errors due to using a URL that is too large.
- Allow Mercurial to implement a more efficient wire protocol.

An alternate approach is to send the arguments as part of the request body.
This approach has been rejected because it requires the use of POST
requests, so it would break any existing configuration that relies on the
request type for authentication or caching.

Extensibility:
- The header size is provided by the server, which makes it possible to
  introduce an hgrc setting for it.
- The client ignores the capability value after the first comma, which
  allows more information to be included in the future.
2011-05-01 01:04:37 +08:00
Shuhei Takahashi
ae68689a32 wireproto: allow unbundle with hashed heads parameter (issue2126)
Current wire protocol of unbundle sends the list of all heads in the remote
repository to avoid race condition.  This causes "URL too long" error on HTTP
server when the repository has many heads.

This change allows clients to send SHA1 hash of sorted head hashes instead.
Also, this introduces "unbundlehash" capability to inform them that the server
accepts hashed heads parameter.
2011-04-16 01:05:56 +09:00