Mercurial > public > mercurial-scm > hg
diff tests/helpers-testrepo.sh @ 33204:ddd65b4f3ae6
tests: alias syshg and syshgenv so they can be switched conditionally
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 02 Jul 2017 13:14:20 +0900 |
parents | 98e2c78e309c |
children | 2d7300cf3f3f |
line wrap: on
line diff
--- a/tests/helpers-testrepo.sh Fri Jun 30 21:49:29 2017 +0900 +++ b/tests/helpers-testrepo.sh Sun Jul 02 13:14:20 2017 +0900 @@ -27,11 +27,10 @@ # in ancient versions of hg. So we double check if "syshg files" works and # fallback to hg bundled in the repo. syshg files -h >/dev/null 2>/dev/null -if [ $? -ne 0 ]; then - syshg() { - hg "$@" - } - syshgenv() { - : - } +if [ $? -eq 0 ]; then + alias testrepohg=syshg + alias testrepohgenv=syshgenv +else + alias testrepohg=hg + alias testrepohgenv=: fi