Size: 660
Comment: Cleanup
|
Size: 938
Comment: Clarified line endings.
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
Command names are sent over the ssh pipe as plain text, followed by a newline. Arguments are sent as {{{[argname] [value length]\n}}}, followed by the value. Responses are {{{[response length]\n}}}, followed by the response. | Command names are sent over the ssh pipe as plain text, followed by a ''single character'' linebreak. This is important on systems that automatically use a two character line-break, such as CR+LF on Windows: if there is extra whitespace on the end of the command (in the case of windows, there will be an extra CR at the end), it will not be recognized. Arguments are sent as {{{[argname] [value length]\n}}}, followed by the value. Responses are {{{[response length]\n}}}, followed by the response. |
|
Command names are sent over the ssh pipe as plain text, followed by a single character linebreak. This is important on systems that automatically use a two character line-break, such as CR+LF on Windows: if there is extra whitespace on the end of the command (in the case of windows, there will be an extra CR at the end), it will not be recognized.
Arguments are sent as [argname] [value length]\n, followed by the value. Responses are [response length]\n, followed by the response.
Example:
send: heads response: 41 482d3fb47d80693f929101f95944bf019009dd79
Version detection
Because older Mercurial versions give no/zero-length responses to unknown commands, you must first send the hello command followed by a command with known output, and then determine if the hello command responded before the known output was sent.