view tests/fixtures/emptyrepo2.sh @ 1501:6e3f48d8002f

tests: fix ipv6 support in test_push_command.py This test runs the `svnserve` binary, which appears to resolve the hostname passed as an argument using gethostbyname(3), which can only return an IPv4 address. When run on a system that is configured to only have an IPv6 address, Mercurial will correctly resolve the hostname to an IPv6 address, but the SVN server will be listening on an incorrect IPv4 address, causing the test to fail. The workaround is to resolve the hostname using getaddrinfo(3) in the test harness and pass the resulting address to svnserve.
author Arun Kulshreshtha <kulshrax@fb.com>
date Mon, 10 Apr 2017 16:58:28 -0700
parents f9014e28721b
children
line wrap: on
line source

#!/bin/sh
#
# Create emptyrepo2.svndump
#
# The generated repository contains a sequence of empty revisions
# created with a combination of svnsync and filtering

mkdir temp
cd temp

mkdir project-orig
cd project-orig
mkdir -p sub/trunk other
echo a > other/a
cd ..

svnadmin create testrepo
svnurl=file://`pwd`/testrepo
svn import project-orig $svnurl -m init

svn co $svnurl project
cd project
echo a >> other/a
svn ci -m othera
echo a >> other/a
svn ci -m othera2
echo b > sub/trunk/a
svn add sub/trunk/a
svn ci -m adda
cd ..

svnadmin create testrepo2
cat > testrepo2/hooks/pre-revprop-change <<EOF
#!/bin/sh
exit 0
EOF
chmod +x testrepo2/hooks/pre-revprop-change

svnurl2=file://`pwd`/testrepo2
svnsync init --username svnsync $svnurl2 $svnurl/sub
svnsync sync $svnurl2

svnadmin dump testrepo2 > ../emptyrepo2.svndump