sapling/tests/fixtures/invalid_utf8.sh
Kostia Balytskyi 3cc5c5756c hgsubversion: move tests to the general tests dir
Summary:
Move tests to where we are used to them.

Note that I don't move comprehensive tests to the `tests` directory, since
I think that having them not run when `./run-tests.py` is run without arguments
may be a useful thing. In general, we may adopt this concept for the core as well.
If we decide we do want to move them, it's very easy to do.

Depends on D6719879

Test Plan: - fixups and test runs follow in the stack

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6719883
2018-01-17 03:23:44 -08:00

35 lines
726 B
Bash
Executable File

#!/bin/bash
#-*- coding: utf-8 -*-
#
# Generate invalid_utf8.svndump
#
#check svnadmin version, must be >= 1.7
SVNVERSION=$(svnadmin --version | head -n 1 | cut -d \ -f 3)
if [[ "$SVNVERSION" < '1.7' ]] ; then
echo "You MUST have svn 1.7 or above to use this script"
exit 1
fi
set -x
TMPDIR=$(mktemp -d)
WD=$(pwd)
cd $TMPDIR
svnadmin create failrepo
svn co file://$PWD/failrepo fail
(
cd fail
touch A
svn add A
svn ci -m blabargrod
)
svnadmin --pre-1.6-compatible create invalid_utf8
svnadmin dump failrepo | \
sed "s/blabargrod/$(echo blåbærgrød | iconv -f utf-8 -t latin1)/g" | \
svnadmin load --bypass-prop-validation invalid_utf8
tar cz -C invalid_utf8 -f "$WD"/invalid_utf8.tar.gz .