sapling/tests/helpers-usechg.sh
Jun Wu 5851c126a5 tests: fix helpers-usechg.sh
Summary:
I noticed some tests were running slower without chg. Upon investigation,
`alias hg=...` seems stop working. Similar to D7563731, let's define
functions explicitly instead.

Reviewed By: singhsrb

Differential Revision: D7964291

fbshipit-source-id: 08a69c865ffef6be7e84dd66a7cece9284b94e60
2018-05-11 16:20:55 -07:00

11 lines
223 B
Bash

# Make the test use chg if possible
if [ -x "$RUNTESTDIR/../contrib/chg/chg" ] && [ -z "$CHGHG" ]; then
CHGHG="${HG:-hg}"
export CHGHG
alias hg="${CHG:-chg}"
hg() {
"$RUNTESTDIR/../contrib/chg/chg" "$@"
}
fi