view tests/test-add @ 9857:24bc6e414610

diff: change --inverse to --reverse This fixes an incompatibility with patch(1), which also uses --reverse for reversed diffs. The --inverse flag was added in 3f522d2fa633. That name was chosen over --reverse since it was thought that --reverse would make --rev ambiguous. It turns out that both flags can co-exist, with the cost that --rev can no longer be shortened to --r and --re. Since one can always use the short -r option, this is not a real problem.
author Martin Geisler <mg@lazybytes.net>
date Sat, 14 Nov 2009 14:21:53 +0100
parents e6162b854ed5
children
line wrap: on
line source

#!/bin/sh

hg init a
cd a
echo a > a
hg add -n
hg st
hg add
hg st
hg forget a
hg add
hg st

echo b > b
hg add -n b
hg st
hg add b || echo "failed to add b"
hg st
echo % should fail
hg add b
hg st

hg ci -m 0 --traceback
echo % should fail
hg add a

echo aa > a
hg ci -m 1
hg up 0
echo aaa > a
hg ci -m 2

hg merge
hg st
echo % should fail
hg add a
hg st
hg resolve -m a
hg ci -m merge

echo % issue683
hg forget a
hg add a
hg st
hg rm a
hg st
echo a > a
hg add a
hg st

hg add c && echo "unexpected addition of missing file"
echo c > c
hg add d c && echo "unexpected addition of missing file"
hg st