While debugging http://dev.mutt.org/trac/ticket/3613 I discovered
that the version.sh script works differently with bash 4.1 than
4.2. In particular, this line:
[ -n "$HGROOT" ] && HG="$HG -R \$HGROOT"
Note that the second $HGROOT is prefixed with a backslash,
preventing expansion, and setting $HG to the string:
hg -R $HGROOT
In bash 4.2, when $HG is used in a command expansion (``) the
$HGROOT seems to be expanded, but in bash 4.1 it is not, causing
the following error:
abort: Repository $HGROOT not found!
I was unsuccessful in finding any documentation as to how
expansion is performed on the shell command itself.
It seems to me the simple fix is just to remove the backslash and
allow $HGROOT to be expanded at the time $HG is first set, but I
figured I'd ask to see if anyone knew why it was written this way
in the first place?
me