tests/testlib/pythonpath.sh
author Martin von Zweigbergk <martinvonz@google.com>
Mon, 11 Mar 2019 23:57:12 -0700
changeset 4500 cfcb7eedc666
parent 4336 33fc61e5e119
child 5316 277b45cf0dda
permissions -rw-r--r--
evolve: use merge.update() for resolving phase divergence Iterating over the manifest when tree manifests and narrowness is in play produces entries for paths outside the narrowspec that represent trees. For example, if the tests/ directory of the hg repo was not in the narrowspec (and the hg repo was using tree manifests, which it doesn't), then there would be a "tests/" entry in the manifest. The merge code deals with some of these cases. For example, it's valid to do a merge if only the local side changes directories outside the narrowspec. That allows rebasing a local commit onto a public commit that had changes to the excluded paths to work. However, _resolvephasedivergent() was iterating of the manifests, which resulted in crashes for some of our users when they tried to resolve phase-divergent commits (actually content-divergent commits that became phase-divergent after the intermediate rebase). We can fix that by relying on merge.update(), since that already handles this case.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2046
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     1
# utility to setup pythonpath to point into the tested repository
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     2
4332
9980df8eda98 tests: fix PYTHONPATH manipulation on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2046
diff changeset
     3
export SRCDIR="`dirname $TESTDIR`"
2046
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     4
if [ -n "$PYTHONPATH" ]; then
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     5
    export HGTEST_ORIG_PYTHONPATH=$PYTHONPATH
4336
33fc61e5e119 tests: remove unused variable and needless subshell in testlib/pythonpath.sh
Anton Shestakov <av6@dwimlabs.net>
parents: 4332
diff changeset
     6
    if uname -o | grep -q Msys; then
4332
9980df8eda98 tests: fix PYTHONPATH manipulation on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2046
diff changeset
     7
        export PYTHONPATH="$SRCDIR;$PYTHONPATH"
9980df8eda98 tests: fix PYTHONPATH manipulation on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2046
diff changeset
     8
    else
9980df8eda98 tests: fix PYTHONPATH manipulation on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2046
diff changeset
     9
        export PYTHONPATH=$SRCDIR:$PYTHONPATH
9980df8eda98 tests: fix PYTHONPATH manipulation on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2046
diff changeset
    10
    fi
2046
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    11
else
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    12
    export PYTHONPATH=$SRCDIR
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    13
fi