tests/test-clone
author Greg Ward <greg-hg@gerg.ca>
Mon, 15 Jun 2009 20:35:19 -0400
changeset 8818 727f7aaefaab
parent 8167 6c82beaaa11a
child 9714 2f1ab7f77ddc
permissions -rwxr-xr-x
Rename CVSNT "mergepoints" test and make it executable. - rename test-convert-cvs-builtincvsps-cvsnt-mergepoints (and related files) to test-convert-cvsnt-mergepoints - this ensures that the test will be run, but does NOT make it pass: in particularly, it fails regularly for me due to the inconsistent behaviour of CVS itself - expect "Branchpoints:" in debugcvsps output

#!/bin/sh

echo
echo % prepare repo a
mkdir a
cd a
hg init
echo a > a
hg add a
hg commit -m test
echo first line > b
hg add b
# create a non-inlined filelog
python -c 'for x in range(10000): print x' >> data1
for j in 0 1 2 3 4 5 6 7 8 9; do
    cat data1 >> b
    hg commit -m test
done
echo % "list files in store/data (should show a 'b.d')"
for i in .hg/store/data/*; do
    echo $i
done

echo
echo % default operation
hg clone . ../b
cd ../b
cat a
hg verify

echo
echo % no update
hg clone -U . ../c
cd ../c
cat a 2>/dev/null || echo "a not present"
hg verify

echo
echo % default destination
mkdir ../d
cd ../d
hg clone ../a
cd a
hg cat a

echo
echo % "check that we drop the file:// from the path before"
echo % "writing the .hgrc"
cd ../..
hg clone file://a e
grep 'file:' e/.hg/hgrc

echo
echo % check that path aliases are expanded
hg clone -q -U --config 'paths.foobar=a#0' foobar f
hg -R f showconfig paths.default | sed -e 's,.*/,,'

echo
echo % use --pull
hg clone --pull a g
hg -R g verify

echo
echo % clone to '.'
mkdir h
cd h
hg clone ../a .
cd ..

exit 0