Mercurial > evolve
annotate tests/testlib/pythonpath.sh @ 6935:954d7ea5cd67 stable tip
stack: when stack base is obsolete, pick any successor, even if at random
There are situations when s0 is obsolete and we also cannot pick just one
successor for it to use in stack. In such a case, let's pick the "latest"
successor from the first set.
We're assuming that obsutil.successorssets() returns data in the same order (it
should, since it makes sure to sort data internally). Keeping that in mind,
while the successor picked for s0 by this code is not based on any sort of
sophisticated logic, it should nonetheless be the same every time.
This patch is probably not going to completely break anything that was
previously working fine, because the previous behavior was to just abort with
an exception.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 16 Nov 2024 17:01:02 +0400 |
parents | 277b45cf0dda |
children |
rev | line source |
---|---|
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 |
5268
277b45cf0dda
tests: silence potential warnings about uname -o
Joerg Sonnenberger <joerg@bec.de>
parents:
4336
diff
changeset
|
6 if uname -o 2> /dev/null | 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 |