##// END OF EJS Templates
tests: use system hg only if changelog or dirstate can't be read...
Yuya Nishihara -
r33201:45d6e276 default
parent child Browse files
Show More
@@ -1,5 +1,6 b''
1 # Invoke the system hg installation (rather than the local hg version being
1 # In most cases, the mercurial repository can be read by the bundled hg, but
2 # tested).
2 # that isn't always true because third-party extensions may change the store
3 # format, for example. In which case, the system hg installation is used.
3 #
4 #
4 # We want to use the hg version being tested when interacting with the test
5 # We want to use the hg version being tested when interacting with the test
5 # repository, and the system hg when interacting with the mercurial source code
6 # repository, and the system hg when interacting with the mercurial source code
@@ -41,11 +42,9 b' cat >> "$HGRCPATH" << EOF'
41 evolution = createmarkers
42 evolution = createmarkers
42 EOF
43 EOF
43
44
44 # Most test-check-* sourcing this file run "hg files", which is not available
45 # Use the system hg command if the bundled hg can't read the repository with
45 # in ancient versions of hg. So we double check if "syshg files" works and
46 # no warning nor error.
46 # fallback to hg bundled in the repo.
47 if [ -n "`hg id -R "$TESTDIR/.." 2>&1 >/dev/null`" ]; then
47 syshg files -h >/dev/null 2>/dev/null
48 if [ $? -eq 0 ]; then
49 alias testrepohg=syshg
48 alias testrepohg=syshg
50 alias testrepohgenv=syshgenv
49 alias testrepohgenv=syshgenv
51 else
50 else
General Comments 0
You need to be logged in to leave comments. Login now