Show More
@@ -153,3 +153,218 b' If the server receives an unknown comman' | |||||
153 | response. |
|
153 | response. | |
154 |
|
154 | |||
155 | The server terminates if it receives an empty command (a ``\n`` character). |
|
155 | The server terminates if it receives an empty command (a ``\n`` character). | |
|
156 | ||||
|
157 | Capabilities | |||
|
158 | ============ | |||
|
159 | ||||
|
160 | Servers advertise supported wire protocol features. This allows clients to | |||
|
161 | probe for server features before blindly calling a command or passing a | |||
|
162 | specific argument. | |||
|
163 | ||||
|
164 | The server's features are exposed via a *capabilities* string. This is a | |||
|
165 | space-delimited string of tokens/features. Some features are single words | |||
|
166 | like ``lookup`` or ``batch``. Others are complicated key-value pairs | |||
|
167 | advertising sub-features. e.g. ``httpheader=2048``. When complex, non-word | |||
|
168 | values are used, each feature name can define its own encoding of sub-values. | |||
|
169 | Comma-delimited and ``x-www-form-urlencoded`` values are common. | |||
|
170 | ||||
|
171 | The following document capabilities defined by the canonical Mercurial server | |||
|
172 | implementation. | |||
|
173 | ||||
|
174 | batch | |||
|
175 | ----- | |||
|
176 | ||||
|
177 | Whether the server supports the ``batch`` command. | |||
|
178 | ||||
|
179 | This capability/command was introduced in Mercurial 1.9 (released July 2011). | |||
|
180 | ||||
|
181 | branchmap | |||
|
182 | --------- | |||
|
183 | ||||
|
184 | Whether the server supports the ``branchmap`` command. | |||
|
185 | ||||
|
186 | This capability/command was introduced in Mercurial 1.3 (released July 2009). | |||
|
187 | ||||
|
188 | bundle2-exp | |||
|
189 | ----------- | |||
|
190 | ||||
|
191 | Precursor to ``bundle2`` capability that was used before bundle2 was a | |||
|
192 | stable feature. | |||
|
193 | ||||
|
194 | This capability was introduced in Mercurial 3.0 behind an experimental | |||
|
195 | flag. This capability should not be observed in the wild. | |||
|
196 | ||||
|
197 | bundle2 | |||
|
198 | ------- | |||
|
199 | ||||
|
200 | Indicates whether the server supports the ``bundle2`` data exchange format. | |||
|
201 | ||||
|
202 | The value of the capability is a URL quoted, newline (``\n``) delimited | |||
|
203 | list of keys or key-value pairs. | |||
|
204 | ||||
|
205 | A key is simply a URL encoded string. | |||
|
206 | ||||
|
207 | A key-value pair is a URL encoded key separated from a URL encoded value by | |||
|
208 | an ``=``. If the value is a list, elements are delimited by a ``,`` after | |||
|
209 | URL encoding. | |||
|
210 | ||||
|
211 | For example, say we have the values:: | |||
|
212 | ||||
|
213 | {'HG20': [], 'changegroup': ['01', '02'], 'digests': ['sha1', 'sha512']} | |||
|
214 | ||||
|
215 | We would first construct a string:: | |||
|
216 | ||||
|
217 | HG20\nchangegroup=01,02\ndigests=sha1,sha512 | |||
|
218 | ||||
|
219 | We would then URL quote this string:: | |||
|
220 | ||||
|
221 | HG20%0Achangegroup%3D01%2C02%0Adigests%3Dsha1%2Csha512 | |||
|
222 | ||||
|
223 | This capability was introduced in Mercurial 3.4 (released May 2015). | |||
|
224 | ||||
|
225 | changegroupsubset | |||
|
226 | ----------------- | |||
|
227 | ||||
|
228 | Whether the server supports the ``changegroupsubset`` command. | |||
|
229 | ||||
|
230 | This capability was introduced in Mercurial 0.9.2 (released December | |||
|
231 | 2006). | |||
|
232 | ||||
|
233 | This capability was introduced at the same time as the ``lookup`` | |||
|
234 | capability/command. | |||
|
235 | ||||
|
236 | getbundle | |||
|
237 | --------- | |||
|
238 | ||||
|
239 | Whether the server supports the ``getbundle`` command. | |||
|
240 | ||||
|
241 | This capability was introduced in Mercurial 1.9 (released July 2011). | |||
|
242 | ||||
|
243 | httpheader | |||
|
244 | ---------- | |||
|
245 | ||||
|
246 | Whether the server supports receiving command arguments via HTTP request | |||
|
247 | headers. | |||
|
248 | ||||
|
249 | The value of the capability is an integer describing the max header | |||
|
250 | length that clients should send. Clients should ignore any content after a | |||
|
251 | comma in the value, as this is reserved for future use. | |||
|
252 | ||||
|
253 | This capability was introduced in Mercurial 1.9 (released July 2011). | |||
|
254 | ||||
|
255 | httppostargs | |||
|
256 | ------------ | |||
|
257 | ||||
|
258 | **Experimental** | |||
|
259 | ||||
|
260 | Indicates that the server supports and prefers clients send command arguments | |||
|
261 | via a HTTP POST request as part of the request body. | |||
|
262 | ||||
|
263 | This capability was introduced in Mercurial 3.8 (released May 2016). | |||
|
264 | ||||
|
265 | known | |||
|
266 | ----- | |||
|
267 | ||||
|
268 | Whether the server supports the ``known`` command. | |||
|
269 | ||||
|
270 | This capability/command was introduced in Mercurial 1.9 (released July 2011). | |||
|
271 | ||||
|
272 | lookup | |||
|
273 | ------ | |||
|
274 | ||||
|
275 | Whether the server supports the ``lookup`` command. | |||
|
276 | ||||
|
277 | This capability was introduced in Mercurial 0.9.2 (released December | |||
|
278 | 2006). | |||
|
279 | ||||
|
280 | This capability was introduced at the same time as the ``changegroupsubset`` | |||
|
281 | capability/command. | |||
|
282 | ||||
|
283 | pushkey | |||
|
284 | ------- | |||
|
285 | ||||
|
286 | Whether the server supports the ``pushkey`` and ``listkeys`` commands. | |||
|
287 | ||||
|
288 | This capability was introduced in Mercurial 1.6 (released July 2010). | |||
|
289 | ||||
|
290 | standardbundle | |||
|
291 | -------------- | |||
|
292 | ||||
|
293 | **Unsupported** | |||
|
294 | ||||
|
295 | This capability was introduced during the Mercurial 0.9.2 development cycle in | |||
|
296 | 2006. It was never present in a release, as it was replaced by the ``unbundle`` | |||
|
297 | capability. This capability should not be encountered in the wild. | |||
|
298 | ||||
|
299 | stream-preferred | |||
|
300 | ---------------- | |||
|
301 | ||||
|
302 | If present the server prefers that clients clone using the streaming clone | |||
|
303 | protocol (``hg clone --uncompressed``) rather than the standard | |||
|
304 | changegroup/bundle based protocol. | |||
|
305 | ||||
|
306 | This capability was introduced in Mercurial 2.2 (released May 2012). | |||
|
307 | ||||
|
308 | streamreqs | |||
|
309 | ---------- | |||
|
310 | ||||
|
311 | Indicates whether the server supports *streaming clones* and the *requirements* | |||
|
312 | that clients must support to receive it. | |||
|
313 | ||||
|
314 | If present, the server supports the ``stream_out`` command, which transmits | |||
|
315 | raw revlogs from the repository instead of changegroups. This provides a faster | |||
|
316 | cloning mechanism at the expense of more bandwidth used. | |||
|
317 | ||||
|
318 | The value of this capability is a comma-delimited list of repo format | |||
|
319 | *requirements*. These are requirements that impact the reading of data in | |||
|
320 | the ``.hg/store`` directory. An example value is | |||
|
321 | ``streamreqs=generaldelta,revlogv1`` indicating the server repo requires | |||
|
322 | the ``revlogv1`` and ``generaldelta`` requirements. | |||
|
323 | ||||
|
324 | If the only format requirement is ``revlogv1``, the server may expose the | |||
|
325 | ``stream`` capability instead of the ``streamreqs`` capability. | |||
|
326 | ||||
|
327 | This capability was introduced in Mercurial 1.7 (released November 2010). | |||
|
328 | ||||
|
329 | stream | |||
|
330 | ------ | |||
|
331 | ||||
|
332 | Whether the server supports *streaming clones* from ``revlogv1`` repos. | |||
|
333 | ||||
|
334 | If present, the server supports the ``stream_out`` command, which transmits | |||
|
335 | raw revlogs from the repository instead of changegroups. This provides a faster | |||
|
336 | cloning mechanism at the expense of more bandwidth used. | |||
|
337 | ||||
|
338 | This capability was introduced in Mercurial 0.9.1 (released July 2006). | |||
|
339 | ||||
|
340 | When initially introduced, the value of the capability was the numeric | |||
|
341 | revlog revision. e.g. ``stream=1``. This indicates the changegroup is using | |||
|
342 | ``revlogv1``. This simple integer value wasn't powerful enough, so the | |||
|
343 | ``streamreqs`` capability was invented to handle cases where the repo | |||
|
344 | requirements have more than just ``revlogv1``. Newer servers omit the | |||
|
345 | ``=1`` since it was the only value supported and the value of ``1`` can | |||
|
346 | be implied by clients. | |||
|
347 | ||||
|
348 | unbundlehash | |||
|
349 | ------------ | |||
|
350 | ||||
|
351 | Whether the ``unbundle`` commands supports receiving a hash of all the | |||
|
352 | heads instead of a list. | |||
|
353 | ||||
|
354 | For more, see the documentation for the ``unbundle`` command. | |||
|
355 | ||||
|
356 | This capability was introduced in Mercurial 1.9 (released July 2011). | |||
|
357 | ||||
|
358 | unbundle | |||
|
359 | -------- | |||
|
360 | ||||
|
361 | Whether the server supports pushing via the ``unbundle`` command. | |||
|
362 | ||||
|
363 | This capability/command has been present since Mercurial 0.9.1 (released | |||
|
364 | July 2006). | |||
|
365 | ||||
|
366 | Mercurial 0.9.2 (released December 2006) added values to the capability | |||
|
367 | indicating which bundle types the server supports receiving. This value is a | |||
|
368 | comma-delimited list. e.g. ``HG10GZ,HG10BZ,HG10UN``. The order of values | |||
|
369 | reflects the priority/preference of that type, where the first value is the | |||
|
370 | most preferred type. |
General Comments 0
You need to be logged in to leave comments.
Login now