tests/testlib/pythonpath.sh
author Martin von Zweigbergk <martinvonz@google.com>
Wed, 30 Jan 2019 10:03:00 -0800
changeset 4393 159a4a6ded0b
parent 4336 33fc61e5e119
child 5316 277b45cf0dda
permissions -rw-r--r--
prompts: use 1-indexing in revselectionprompt() The consumer is generally a human, not a computer. I've made the mistake of entering "1" instead of "0" a few times myself.

# 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