tests/test-copy2
author Thomas Arendsen Hein <thomas@intevation.de>
Thu, 14 Jun 2007 12:54:06 +0200
changeset 4583 11cf78983961
parent 4374 de612b5f8d59
child 4677 de8ec7e1753a
permissions -rwxr-xr-x
Reverted changesets 9d1380e5c8c5 and 1d46169ec197: show @ as glog parent again. Repainted the bikeshed with its original color.

#!/bin/sh

hg init
echo foo > foo
hg add foo
hg commit -m1 -d"0 0"

echo "# should show copy"
hg copy foo bar
hg debugstate|grep '^copy'

echo "# shouldn't show copy"
hg commit -m2 -d"0 0"
hg debugstate|grep '^copy'

echo "# should match"
hg debugindex .hg/store/data/foo.i
hg debugrename bar

echo bleah > foo
echo quux > bar
hg commit -m3 -d"0 0"

echo "# should not be renamed"
hg debugrename bar

hg copy -f foo bar
echo "# should show copy"
hg debugstate|grep '^copy'
hg commit -m3 -d"0 0"

echo "# should show no parents for tip"
hg debugindex .hg/store/data/bar.i
echo "# should match"
hg debugindex .hg/store/data/foo.i
hg debugrename bar

echo "# should show no copies"
hg debugstate|grep '^copy'

echo "# copy --after on an added file"
cp bar baz
hg add baz
hg cp -A bar baz
hg st -C

exit 0