--- a/tests/test-alias.t Tue May 03 16:33:25 2016 -0400
+++ b/tests/test-alias.t Sat May 07 00:16:58 2016 +0100
@@ -525,6 +525,24 @@
(use "hg help" for the full list of commands or "hg -v" for details)
[255]
+environment variable changes in alias commands
+
+ $ cat > $TESTTMP/setcount.py <<EOF
+ > import os
+ > def uisetup(ui):
+ > os.environ['COUNT'] = '2'
+ > EOF
+
+ $ cat >> $HGRCPATH <<'EOF'
+ > [extensions]
+ > setcount = $TESTTMP/setcount.py
+ > [alias]
+ > showcount = log -T "$COUNT\n" -r .
+ > EOF
+
+ $ COUNT=1 hg showcount
+ 2
+
This should show id:
$ hg --config alias.log='id' log