weblate/scripts/pack-test-data
Michal Čihař 0c83cbadbf Create repository compatible with older SVN versions
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-22 08:21:08 +02:00

31 lines
859 B
Bash
Executable file

#!/bin/sh
# Packs test data for Weblate
# Output directory
OUT=`pwd`/weblate/trans/tests/data/
# Working directory
WD=`mktemp -d`
cd $WD
# Clone and cleanup Mercurial repo
hg clone --updaterev null https://bitbucket.org/nijel/weblate-test test-base-repo.hg
# Close bare Git repo
git clone --bare https://github.com/WeblateOrg/test.git test-base-repo.git
# Create SVN repo with same content as Git
git clone --reference test-base-repo.git https://github.com/WeblateOrg/test.git test-data
svnadmin create --compatible-version 1.6 test-base-repo.svn
cd test-data
rm -rf .git
svn import -m 'Import po files' . file://$WD/test-base-repo.svn/trunk
cd ..
# Pack them
tar cf $OUT/test-base-repo.hg.tar test-base-repo.hg
tar cf $OUT/test-base-repo.git.tar test-base-repo.git
tar cf $OUT/test-base-repo.svn.tar test-base-repo.svn
# Remove working dir
rm -rf $WD