2017-06-16 20:57:52 +03:00
|
|
|
source "$RUNTESTDIR/helpers-testrepo.sh"
|
|
|
|
|
2017-07-08 07:06:48 +03:00
|
|
|
# some version of helpers-testrepo.sh does not do this, but we want it to
|
|
|
|
# remove the obsstore warning. so let's check HGRCPATH and do it again.
|
|
|
|
if grep -q createmarkers "$HGRCPATH"; then
|
|
|
|
:
|
|
|
|
else
|
|
|
|
cat >> "$HGRCPATH" << EOF
|
|
|
|
[experimental]
|
|
|
|
evolution = createmarkers
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2017-06-16 20:57:52 +03:00
|
|
|
# go to repo root
|
|
|
|
cd "$TESTDIR"/..
|
|
|
|
|
|
|
|
# enable lz4revlog if it's required
|
|
|
|
if grep -q 'lz4revlog' .hg/requires; then
|
|
|
|
cat >> "$HGRCPATH" <<EOF
|
|
|
|
[extensions]
|
|
|
|
lz4revlog=
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
# sanity check whether hg actually works or not
|
2017-12-15 23:22:54 +03:00
|
|
|
if ! testrepohg log -r tip -T '{author}' >/dev/null 2>"$TESTTMP/hg-err-check";
|
|
|
|
then
|
2017-08-16 02:56:54 +03:00
|
|
|
echo 'hg does not work'
|
|
|
|
exit 1
|
2017-06-16 20:57:52 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
# hg might work but print "failed to ..." - treat that as an error
|
|
|
|
if [ -s "$TESTTMP/hg-err-check" ]; then
|
2017-08-16 02:56:54 +03:00
|
|
|
echo 'hg outputs to stderr: ' `cat "$TESTTMP/hg-err-check"`
|
|
|
|
exit 1
|
2017-06-16 20:57:52 +03:00
|
|
|
fi
|