diff --git a/tests/helper-testrepo.sh b/tests/helper-testrepo.sh --- a/tests/helper-testrepo.sh +++ b/tests/helper-testrepo.sh @@ -23,7 +23,8 @@ fi # sanity check whether hg actually works or not -if ! hg log -r tip -T '{author}' >/dev/null 2>"$TESTTMP/hg-err-check"; then +if ! testrepohg log -r tip -T '{author}' >/dev/null 2>"$TESTTMP/hg-err-check"; +then echo 'hg does not work' exit 1 fi diff --git a/tests/test-check-code-hg.t b/tests/test-check-code-hg.t --- a/tests/test-check-code-hg.t +++ b/tests/test-check-code-hg.t @@ -7,8 +7,8 @@ New errors are not allowed. Warnings are strongly discouraged. (The writing "no-che?k-code" is for not skipping this file when checking.) - $ hg files "set:grep('Generated by Cython')" > $TESTTMP/cython-generated - $ echo "${LINTFILES:-`hg locate`}" | sed 's-\\-/-g' | grep -v ^third-party/ > "$TESTTMP/check-files" + $ testrepohg files "set:grep('Generated by Cython')" > $TESTTMP/cython-generated + $ echo "${LINTFILES:-`testrepohg locate`}" | sed 's-\\-/-g' | grep -v ^third-party/ > "$TESTTMP/check-files" $ cat "$TESTTMP/cython-generated" | while read i; do > grep -F -v "$i" "$TESTTMP/check-files" > "$TESTTMP/check-files-new" > mv "$TESTTMP/check-files-new" "$TESTTMP/check-files" @@ -107,9 +107,9 @@ Check extensions usage - $ hg locate 'test-*.t' | xargs $TESTDIR/check-ext.py + $ testrepohg locate 'test-*.t' | xargs $TESTDIR/check-ext.py No files with home directory committed - $ hg files "set:grep('/""home/')" + $ testrepohg files "set:grep('/""home/')" [1] diff --git a/tests/test-check-commit-hg.t b/tests/test-check-commit-hg.t --- a/tests/test-check-commit-hg.t +++ b/tests/test-check-commit-hg.t @@ -17,8 +17,8 @@ $ cd $TESTDIR/.. $ unset BYPASS - $ for node in `hg log --rev 'not public() and ::. and not desc("# no-check-commit")' --template '{node|short}\n'`; do - > hg export $node | $RUNTESTDIR/../contrib/check-commit > ${TESTTMP}/check-commit.out + $ for node in `testrepohg log --rev 'not public() and ::. and not desc("# no-check-commit")' --template '{node|short}\n'`; do + > testrepohg export $node | $RUNTESTDIR/../contrib/check-commit > ${TESTTMP}/check-commit.out > if [ $? -ne 0 ]; then > echo "Revision $node does not comply with rules" > echo '------------------------------------------------------' diff --git a/tests/test-check-config-hg.t b/tests/test-check-config-hg.t --- a/tests/test-check-config-hg.t +++ b/tests/test-check-config-hg.t @@ -11,8 +11,8 @@ $ export RUNTESTDIR $ ( - > hg files "set:(**.py or **.txt) - tests/**" - > hg files --cwd $RUNTESTDIR/.. "set:(**.py or **.txt) - tests/**" | sed "s#^#${RUNTESTDIR}/../#" + > testrepohg files "set:(**.py or **.txt) - tests/**" + > testrepohg files --cwd $RUNTESTDIR/.. "set:(**.py or **.txt) - tests/**" | sed "s#^#${RUNTESTDIR}/../#" > ) | sed 's|\\|/|g' | > $PYTHON $RUNTESTDIR/../contrib/check-config.py undocumented: extensions.treemanifest (str) diff --git a/tests/test-check-execute-hg.t b/tests/test-check-execute-hg.t --- a/tests/test-check-execute-hg.t +++ b/tests/test-check-execute-hg.t @@ -9,20 +9,20 @@ look for python scripts without the execute bit - $ hg files 'set:**.py and not exec() and grep(r"^#!.*?python")' + $ testrepohg files 'set:**.py and not exec() and grep(r"^#!.*?python")' [1] look for python scripts with execute bit but not shebang - $ hg files 'set:**.py and exec() and not grep(r"^#!.*?python")' + $ testrepohg files 'set:**.py and exec() and not grep(r"^#!.*?python")' [1] look for shell scripts with execute bit but not shebang - $ hg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")' + $ testrepohg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")' [1] look for non scripts with no shebang - $ hg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")' + $ testrepohg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")' [1] diff --git a/tests/test-check-py3-compat-hg.t b/tests/test-check-py3-compat-hg.t --- a/tests/test-check-py3-compat-hg.t +++ b/tests/test-check-py3-compat-hg.t @@ -7,7 +7,7 @@ $ . "$TESTDIR/helper-testrepo.sh" $ cd "$TESTDIR"/.. - $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON $RUNTESTDIR/../contrib/check-py3-compat.py + $ testrepohg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON $RUNTESTDIR/../contrib/check-py3-compat.py fastmanifest/__init__.py not using absolute_import fastmanifest/cachemanager.py not using absolute_import fastmanifest/concurrency.py not using absolute_import diff --git a/tests/test-check-pyflakes-hg.t b/tests/test-check-pyflakes-hg.t --- a/tests/test-check-pyflakes-hg.t +++ b/tests/test-check-pyflakes-hg.t @@ -10,7 +10,7 @@ run pyflakes on all tracked files ending in .py or without a file ending (skipping binary file random-seed) - $ hg locate 'set:**.py or grep("^#!.*python")' > "$TESTTMP/files1" + $ testrepohg locate 'set:**.py or grep("^#!.*python")' > "$TESTTMP/files1" $ if [ -n "$LINTFILES" ]; then > printf "$LINTFILES" > "$TESTTMP/files2" > join "$TESTTMP/files1" "$TESTTMP/files2" diff --git a/tests/test-check-shbang-hg.t b/tests/test-check-shbang-hg.t --- a/tests/test-check-shbang-hg.t +++ b/tests/test-check-shbang-hg.t @@ -6,10 +6,10 @@ look for python scripts that do not use /usr/bin/env - $ hg files 'set:grep(r"^#!.*?python") and not grep(r"^#!/usr/bi{1}n/env python")' + $ testrepohg files 'set:grep(r"^#!.*?python") and not grep(r"^#!/usr/bi{1}n/env python")' [1] look for shell scripts that do not use /bin/sh - $ hg files 'set:grep(r"^#!.*/bi{1}n/sh") and not grep(r"^#!/bi{1}n/sh")' + $ testrepohg files 'set:grep(r"^#!.*/bi{1}n/sh") and not grep(r"^#!/bi{1}n/sh")' [1]