Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
and add documentation for this.
--- a/tests/README Tue Aug 22 09:55:14 2006 +0200
+++ b/tests/README Tue Aug 22 10:08:42 2006 +0200
@@ -31,3 +31,6 @@
use hg diff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
-e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
to strip dates
+
+- You can append your own hgrc settings to the file that the environment
+ variable HGRCPATH points to. This file is cleared before running a test.
--- a/tests/test-abort-checkin Tue Aug 22 09:55:14 2006 +0200
+++ b/tests/test-abort-checkin Tue Aug 22 10:08:42 2006 +0200
@@ -1,8 +1,7 @@
#!/bin/sh
-HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
-echo "[extensions]" >> $HGTMP/.hgrc
-echo "mq=" >> $HGTMP/.hgrc
+echo "[extensions]" >> $HGRCPATH
+echo "mq=" >> $HGRCPATH
cat > $HGTMP/false <<EOF
#!/bin/sh
exit 1
--- a/tests/test-bisect Tue Aug 22 09:55:14 2006 +0200
+++ b/tests/test-bisect Tue Aug 22 10:08:42 2006 +0200
@@ -2,9 +2,8 @@
set -e
-HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
-echo "[extensions]" >> $HGTMP/.hgrc
-echo "hbisect=" >> $HGTMP/.hgrc
+echo "[extensions]" >> $HGRCPATH
+echo "hbisect=" >> $HGRCPATH
echo % init
hg init
--- a/tests/test-extdiff Tue Aug 22 09:55:14 2006 +0200
+++ b/tests/test-extdiff Tue Aug 22 10:08:42 2006 +0200
@@ -1,8 +1,7 @@
#!/bin/sh
-HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
-echo "[extensions]" >> $HGTMP/.hgrc
-echo "extdiff=" >> $HGTMP/.hgrc
+echo "[extensions]" >> $HGRCPATH
+echo "extdiff=" >> $HGRCPATH
hg init a
cd a
@@ -14,9 +13,9 @@
fi
hg extdiff -o -Nr $opt
-echo "[extdiff]" >> $HGTMP/.hgrc
-echo "cmd.falabala=echo" >> $HGTMP/.hgrc
-echo "opts.falabala=diffing" >> $HGTMP/.hgrc
+echo "[extdiff]" >> $HGRCPATH
+echo "cmd.falabala=echo" >> $HGRCPATH
+echo "opts.falabala=diffing" >> $HGRCPATH
hg falabala
--- a/tests/test-fetch Tue Aug 22 09:55:14 2006 +0200
+++ b/tests/test-fetch Tue Aug 22 10:08:42 2006 +0200
@@ -1,8 +1,7 @@
#!/bin/sh
-HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
-echo "[extensions]" >> $HGTMP/.hgrc
-echo "fetch=" >> $HGTMP/.hgrc
+echo "[extensions]" >> $HGRCPATH
+echo "fetch=" >> $HGRCPATH
hg init a
echo a > a/a
--- a/tests/test-mq Tue Aug 22 09:55:14 2006 +0200
+++ b/tests/test-mq Tue Aug 22 10:08:42 2006 +0200
@@ -1,8 +1,7 @@
#!/bin/sh
-HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
-echo "[extensions]" >> $HGTMP/.hgrc
-echo "mq=" >> $HGTMP/.hgrc
+echo "[extensions]" >> $HGRCPATH
+echo "mq=" >> $HGRCPATH
echo % help
hg help mq
@@ -127,7 +126,7 @@
hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/'
hg unbundle .hg/strip-backup/*
-cat >>$HGTMP/.hgrc <<EOF
+cat >>$HGRCPATH <<EOF
[diff]
git = True
EOF
--- a/tests/test-mq-guards Tue Aug 22 09:55:14 2006 +0200
+++ b/tests/test-mq-guards Tue Aug 22 10:08:42 2006 +0200
@@ -1,8 +1,7 @@
#!/bin/sh
-HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
-echo "[extensions]" >> $HGTMP/.hgrc
-echo "mq=" >> $HGTMP/.hgrc
+echo "[extensions]" >> $HGRCPATH
+echo "mq=" >> $HGRCPATH
hg init
hg qinit
--- a/tests/test-mq-qdiff Tue Aug 22 09:55:14 2006 +0200
+++ b/tests/test-mq-qdiff Tue Aug 22 10:08:42 2006 +0200
@@ -1,8 +1,7 @@
#!/bin/sh
-HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
-echo "[extensions]" >> $HGTMP/.hgrc
-echo "mq=" >> $HGTMP/.hgrc
+echo "[extensions]" >> $HGRCPATH
+echo "mq=" >> $HGRCPATH
echo % init
hg init a
--- a/tests/test-mq-qnew-twice Tue Aug 22 09:55:14 2006 +0200
+++ b/tests/test-mq-qnew-twice Tue Aug 22 10:08:42 2006 +0200
@@ -1,8 +1,7 @@
#!/bin/sh
-HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
-echo "[extensions]" >> $HGTMP/.hgrc
-echo "mq=" >> $HGTMP/.hgrc
+echo "[extensions]" >> $HGRCPATH
+echo "mq=" >> $HGRCPATH
hg init a
cd a
--- a/tests/test-mq-qrefresh-replace-log-message Tue Aug 22 09:55:14 2006 +0200
+++ b/tests/test-mq-qrefresh-replace-log-message Tue Aug 22 10:08:42 2006 +0200
@@ -1,9 +1,8 @@
#!/bin/sh
# Environement setup for MQ
-HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
-echo "[extensions]" >> $HGTMP/.hgrc
-echo "mq=" >> $HGTMP/.hgrc
+echo "[extensions]" >> $HGRCPATH
+echo "mq=" >> $HGRCPATH
#Repo init
hg init
--- a/tests/test-mq-qsave Tue Aug 22 09:55:14 2006 +0200
+++ b/tests/test-mq-qsave Tue Aug 22 10:08:42 2006 +0200
@@ -1,8 +1,7 @@
#!/bin/sh
-HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
-echo "[extensions]" >> $HGTMP/.hgrc
-echo "mq=" >> $HGTMP/.hgrc
+echo "[extensions]" >> $HGRCPATH
+echo "mq=" >> $HGRCPATH
hg init a
cd a