Show More
@@ -1,27 +1,40 b'' | |||
|
1 | 1 | # Invoke the system hg installation (rather than the local hg version being |
|
2 | 2 | # tested). |
|
3 | 3 | # |
|
4 | 4 | # We want to use the hg version being tested when interacting with the test |
|
5 | 5 | # repository, and the system hg when interacting with the mercurial source code |
|
6 | 6 | # repository. |
|
7 | 7 | # |
|
8 | 8 | # The mercurial source repository was typically orignally cloned with the |
|
9 | 9 | # system mercurial installation, and may require extensions or settings from |
|
10 | 10 | # the system installation. |
|
11 | 11 | syshg () { |
|
12 | 12 | ( |
|
13 | 13 | syshgenv |
|
14 | 14 | exec hg "$@" |
|
15 | 15 | ) |
|
16 | 16 | } |
|
17 | 17 | |
|
18 | 18 | # Revert the environment so that running "hg" runs the system hg |
|
19 | 19 | # rather than the test hg installation. |
|
20 | 20 | syshgenv () { |
|
21 | 21 | PATH="$ORIG_PATH" |
|
22 | 22 | PYTHONPATH="$ORIG_PYTHONPATH" |
|
23 | 23 | JYTHONPATH="$ORIG_JYTHONPATH" |
|
24 | 24 | unset HGRCPATH |
|
25 | 25 | HGPLAIN=1 |
|
26 | 26 | export HGPLAIN |
|
27 | 27 | } |
|
28 | ||
|
29 | # Most test-check-* sourcing this file run "hg files", which is not available | |
|
30 | # in ancient versions of hg. So we double check if "syshg files" works and | |
|
31 | # fallback to hg bundled in the repo. | |
|
32 | syshg files -h >/dev/null 2>/dev/null | |
|
33 | if [ $? -ne 0 ]; then | |
|
34 | syshg() { | |
|
35 | hg "$@" | |
|
36 | } | |
|
37 | syshgenv() { | |
|
38 | : | |
|
39 | } | |
|
40 | fi |
General Comments 0
You need to be logged in to leave comments.
Login now