tests/test-lock-badness
author Matt Mackall <mpm@selenic.com>
Fri, 09 Jun 2006 18:03:35 -0500
changeset 2421 a1cfe679192c
parent 2016 ff5c9a92f556
child 3853 c0b449154a90
permissions -rwxr-xr-x
ssh: add capability detection at startup Because older servers don't return any output for unknown commands, it's tricky to add new commands. The approach is this: we add a "hello" command that reports any interesting capabilities (and other things that might be of interest in the future). To detect whether this new command is supported, we issue both it and our startup detection command ("between") at the beginning of a connection.

#!/bin/sh

hg init a
echo a > a/a
hg --cwd a ci -A -m a
hg clone a b
echo b > b/b
hg --cwd b ci -A -m b
chmod 100 a/.hg
hg --cwd b push ../a
chmod 700 a/.hg