##// END OF EJS Templates
test-convert-svn-sink: rewrite output for svn compatibility...
test-convert-svn-sink: rewrite output for svn compatibility Addition by Patrick Mezard <pmezard@gmail.com>: * drop 'kind=' lines from svn 1.6 output

File last commit:

r6873:39b4db2e default
r8049:99e5f97c default
Show More
test-convert-mtn
89 lines | 1.9 KiB | text/plain | TextLexer
Patrick Mezard
Add a test for monotone conversion
r6372 #!/bin/sh
"$TESTDIR/hghave" mtn || exit 80
# Monotone directory is called .monotone on *nix and monotone
# on Windows. Having a variable here ease test patching.
mtndir=.monotone
echo "[extensions]" >> $HGRCPATH
echo "convert=" >> $HGRCPATH
echo 'hgext.graphlog =' >> $HGRCPATH
HOME=`pwd`/do_not_use_HOME_mtn; export HOME
# Windows version of monotone home
APPDATA=$HOME; export APPDATA
echo % tedious monotone keys configuration
# The /dev/null redirection is necessary under Windows, or
# it complains about home directory permissions
mtn --quiet genkey test@selenic.com 1>/dev/null 2>&1 <<EOF
passphrase
passphrase
EOF
cat >> $HOME/$mtndir/monotonerc <<EOF
function get_passphrase(keypair_id)
return "passphrase"
end
EOF
echo % create monotone repository
mtn db init --db=repo.mtn
mtn --db=repo.mtn --branch=com.selenic.test setup workingdir
cd workingdir
echo a > a
mkdir dir
echo b > dir/b
python -c 'file("bin", "wb").write("a\\x00b")'
echo c > c
mtn add a dir/b c bin
mtn ci -m initialize
echo % update monotone working directory
mtn mv a dir/a
echo a >> dir/a
echo b >> dir/b
mtn drop c
python -c 'file("bin", "wb").write("b\\x00c")'
mtn ci -m update1
cd ..
echo % convert once
hg convert -s mtn repo.mtn
cd workingdir
echo e > e
mtn add e
mtn drop dir/b
mtn mv bin bin2
Patrick Mezard
test-convert-mtn: test descriptions with quotes
r6633 mtn ci -m 'update2 "with" quotes'
Patrick Mezard
test-convert-mtn: test directory move
r6377 # Test directory move
mtn mv dir dir2
mtn ci -m movedir
Patrick Mezard
test-convert-mtn: test directory deletion
r6396 # Test directory removal with empty directory
mkdir dir2/dir
mkdir dir2/dir/subdir
echo f > dir2/dir/subdir/f
mkdir dir2/dir/emptydir
Thomas Arendsen Hein
Make test-convert-mtn pass on systems where mtn add -R uses different order
r6873 mtn add --quiet -R dir2/dir
Patrick Mezard
test-convert-mtn: test directory deletion
r6396 mtn ci -m emptydir
mtn drop -R dir2/dir
mtn ci -m dropdirectory
Patrick Mezard
Add a test for monotone conversion
r6372 cd ..
echo % convert incrementally
hg convert -s mtn repo.mtn
glog()
{
hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@"
}
cd repo.mtn-hg
hg up -C
glog
echo % manifest
hg manifest
echo % contents
Patrick Mezard
test-convert-mtn: test directory move
r6377 cat dir2/a
Patrick Mezard
test-convert-mtn: test directory deletion
r6396 test -d dir2/dir && echo 'removed dir2/dir is still there!'
exit 0
Patrick Mezard
Add a test for monotone conversion
r6372