2005-08-04 21:20:40 +04:00
|
|
|
#!/bin/sh
|
2005-07-01 11:51:25 +04:00
|
|
|
|
|
|
|
# No local source
|
|
|
|
hg clone a b
|
|
|
|
echo $?
|
|
|
|
|
|
|
|
# No remote source
|
|
|
|
hg clone http://127.0.0.1:3121/a b
|
|
|
|
echo $?
|
|
|
|
rm -rf b # work around bug with http clone
|
|
|
|
|
|
|
|
# Inaccessible source
|
|
|
|
mkdir a
|
|
|
|
chmod 000 a
|
|
|
|
hg clone a b
|
|
|
|
echo $?
|
|
|
|
|
|
|
|
# Inaccessible destination
|
|
|
|
mkdir b
|
|
|
|
cd b
|
|
|
|
hg init
|
|
|
|
hg clone . ../a
|
|
|
|
echo $?
|
|
|
|
cd ..
|
|
|
|
chmod 700 a
|
2006-12-26 16:17:48 +03:00
|
|
|
rm -r a b
|
2005-07-01 11:51:25 +04:00
|
|
|
|
|
|
|
# Source of wrong type
|
2007-08-06 11:57:23 +04:00
|
|
|
if "$TESTDIR/hghave" -q fifo; then
|
|
|
|
mkfifo a
|
|
|
|
hg clone a b
|
|
|
|
echo $?
|
|
|
|
rm a
|
|
|
|
else
|
|
|
|
echo "abort: repository a not found!"
|
|
|
|
echo 255
|
|
|
|
fi
|
2005-07-01 11:51:25 +04:00
|
|
|
|
|
|
|
# Default destination, same directory
|
|
|
|
mkdir q
|
|
|
|
cd q
|
|
|
|
hg init
|
|
|
|
cd ..
|
|
|
|
hg clone q
|
|
|
|
|
|
|
|
true
|