tests/helpers-testrepo.sh
changeset 33204 ddd65b4f3ae6
parent 33126 98e2c78e309c
child 33205 2d7300cf3f3f
equal deleted inserted replaced
33203:cf826b9e9ea4 33204:ddd65b4f3ae6
    25 
    25 
    26 # Most test-check-* sourcing this file run "hg files", which is not available
    26 # Most test-check-* sourcing this file run "hg files", which is not available
    27 # in ancient versions of hg. So we double check if "syshg files" works and
    27 # in ancient versions of hg. So we double check if "syshg files" works and
    28 # fallback to hg bundled in the repo.
    28 # fallback to hg bundled in the repo.
    29 syshg files -h >/dev/null 2>/dev/null
    29 syshg files -h >/dev/null 2>/dev/null
    30 if [ $? -ne 0 ]; then
    30 if [ $? -eq 0 ]; then
    31     syshg() {
    31     alias testrepohg=syshg
    32         hg "$@"
    32     alias testrepohgenv=syshgenv
    33     }
    33 else
    34     syshgenv() {
    34     alias testrepohg=hg
    35         :
    35     alias testrepohgenv=:
    36     }
       
    37 fi
    36 fi