Define tla username locally in baz and tla tests
authorPatrick Mezard <pmezard@gmail.com>
Wed, 13 Feb 2008 00:40:18 +0100
changeset 6101 abb1c451a88e
parent 6097 9b817c0a82f1
child 6102 4e351c03a31a
Define tla username locally in baz and tla tests Suggested by Alexis S. L. Carvalho.
tests/test-convert-baz
tests/test-convert-tla
--- a/tests/test-convert-baz	Thu Feb 14 10:55:17 2008 -0600
+++ b/tests/test-convert-baz	Wed Feb 13 00:40:18 2008 +0100
@@ -2,15 +2,11 @@
 
 "$TESTDIR/hghave" baz || exit 80
 
-# I cannot find a way to set the user name locally
-tla my-id > /dev/null 2>&1
-if [ $? -ne 0 ]; then
-    echo '***'
-    echo '* PLEASE SET YOUR TLA USERNAME WITH:'
-    echo '* tla my-id username'
-    echo '***'
-    exit 1;
-fi
+mkdir do_not_use_HOME_baz
+cd do_not_use_HOME_baz
+HOME=`pwd`; export HOME
+cd ..
+tla my-id "mercurial <mercurial@selenic.com>"
 
 echo "[extensions]" >> $HGRCPATH
 echo "convert=" >> $HGRCPATH
--- a/tests/test-convert-tla	Thu Feb 14 10:55:17 2008 -0600
+++ b/tests/test-convert-tla	Wed Feb 13 00:40:18 2008 +0100
@@ -2,15 +2,11 @@
 
 "$TESTDIR/hghave" tla || exit 80
 
-# I cannot find a way to set the user name locally
-tla my-id > /dev/null 2>&1
-if [ $? -ne 0 ]; then
-    echo '***'
-    echo '* PLEASE SET YOUR TLA USERNAME WITH:'
-    echo '* tla my-id username'
-    echo '***'
-    exit 1;
-fi
+mkdir do_not_use_HOME_tla
+cd do_not_use_HOME_tla
+HOME=`pwd`; export HOME
+cd ..
+tla my-id "mercurial <mercurial@selenic.com>"
 
 echo "[extensions]" >> $HGRCPATH
 echo "convert=" >> $HGRCPATH