tests/testlib/pythonpath.sh
author Martin von Zweigbergk <martinvonz@google.com>
Thu, 09 May 2019 09:42:51 -0700
changeset 4642 a7c4f163656b
parent 4336 33fc61e5e119
child 5316 277b45cf0dda
permissions -rw-r--r--
cmdrewrite: use context manager for some locks and transactions These were the trivial cases where I didn't even need to extend the scope of a transaction or change indentation to fix it.

# utility to setup pythonpath to point into the tested repository

export SRCDIR="`dirname $TESTDIR`"
if [ -n "$PYTHONPATH" ]; then
    export HGTEST_ORIG_PYTHONPATH=$PYTHONPATH
    if uname -o | grep -q Msys; then
        export PYTHONPATH="$SRCDIR;$PYTHONPATH"
    else
        export PYTHONPATH=$SRCDIR:$PYTHONPATH
    fi
else
    export PYTHONPATH=$SRCDIR
fi