##// 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
2 # tested).
1 # In most cases, the mercurial repository can be read by the bundled hg, but
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 5 # We want to use the hg version being tested when interacting with the test
5 6 # repository, and the system hg when interacting with the mercurial source code
@@ -41,11 +42,9 b' cat >> "$HGRCPATH" << EOF'
41 42 evolution = createmarkers
42 43 EOF
43 44
44 # Most test-check-* sourcing this file run "hg files", which is not available
45 # in ancient versions of hg. So we double check if "syshg files" works and
46 # fallback to hg bundled in the repo.
47 syshg files -h >/dev/null 2>/dev/null
48 if [ $? -eq 0 ]; then
45 # Use the system hg command if the bundled hg can't read the repository with
46 # no warning nor error.
47 if [ -n "`hg id -R "$TESTDIR/.." 2>&1 >/dev/null`" ]; then
49 48 alias testrepohg=syshg
50 49 alias testrepohgenv=syshgenv
51 50 else
General Comments 0
You need to be logged in to leave comments. Login now