tests: remove the last traces of $HGTMP
authorMads Kiilerich <mads@kiilerich.com>
Fri, 08 Oct 2010 22:36:11 -0500
changeset 12642 bb35840e965c
parent 12641 da6693cce635
child 12643 d08bb64888bc
tests: remove the last traces of $HGTMP $HGTMP isn't needed - and if we need something like that then $TESTTMP is more appropriate.
tests/printenv.py
tests/test-mq-qimport.t
tests/test-notify.t
tests/test-rollback.t
tests/test-ssh.t
tests/test-tag.t
--- a/tests/printenv.py	Fri Oct 08 22:36:10 2010 -0500
+++ b/tests/printenv.py	Fri Oct 08 22:36:11 2010 -0500
@@ -48,8 +48,7 @@
 
 out.write("%s hook: " % name)
 for v in env:
-    out.write("%s=%s " %
-              (v, os.environ[v].replace(os.environ["HGTMP"], '$HGTMP')))
+    out.write("%s=%s " % (v, os.environ[v]))
 out.write("\n")
 out.close()
 
--- a/tests/test-mq-qimport.t	Fri Oct 08 22:36:10 2010 -0500
+++ b/tests/test-mq-qimport.t	Fri Oct 08 22:36:11 2010 -0500
@@ -85,17 +85,18 @@
 
   $ echo foo >> foo
   $ hg add foo
-  $ hg diff > $HGTMP/url.diff
+  $ hg diff > url.diff
   $ hg revert --no-backup foo
   $ rm foo
 
 Under unix: file:///foobar/blah
 Under windows: file:///c:/foobar/blah
 
-  $ patchurl=`echo "$HGTMP"/url.diff | tr '\\\\' /`
+  $ patchurl=`pwd | tr '\\\\' /`/url.diff
   $ expr "$patchurl" : "\/" > /dev/null || patchurl="/$patchurl"
   $ hg qimport file://"$patchurl"
   adding url.diff to series file
+  $ rm url.diff
   $ hg qun
   url.diff
 
--- a/tests/test-notify.t	Fri Oct 08 22:36:10 2010 -0500
+++ b/tests/test-notify.t	Fri Oct 08 22:36:11 2010 -0500
@@ -141,7 +141,7 @@
   (run 'hg update' to get a working copy)
   $ cat <<EOF >> $HGRCPATH
   > [notify]
-  > config = $HGTMP/.notify.conf
+  > config = `pwd`/.notify.conf
   > domain = test.com
   > strip = 3
   > template = Subject: {desc|firstline|strip}\nFrom: {author}\nX-Test: foo\n\nchangeset {node|short} in {webroot}\ndescription:\n\t{desc|tabindent|strip}
@@ -156,7 +156,7 @@
   rolling back to revision 0 (undo pull)
   $ hg --cwd b pull ../a 2>&1 | grep 'error.*\.notify\.conf' > /dev/null && echo pull failed
   pull failed
-  $ touch "$HGTMP/.notify.conf"
+  $ touch ".notify.conf"
 
 pull
 
--- a/tests/test-rollback.t	Fri Oct 08 22:36:10 2010 -0500
+++ b/tests/test-rollback.t	Fri Oct 08 22:36:11 2010 -0500
@@ -74,17 +74,18 @@
   precious commit message
   $ echo '% same thing, but run $EDITOR'
   % same thing, but run $EDITOR
-  $ cat > $HGTMP/editor <<'__EOF__'
+  $ cat > editor << '__EOF__'
   > #!/bin/sh
   > echo "another precious commit message" > "$1"
   > __EOF__
-  > chmod +x "$HGTMP"/editor
-  > HGEDITOR="'$HGTMP'"/editor hg --config hooks.pretxncommit=false commit 2>&1
-  > cat .hg/last-message.txt
+  $ chmod +x editor
+  $ HGEDITOR="'`pwd`'"/editor hg --config hooks.pretxncommit=false commit 2>&1
   transaction abort!
   rollback completed
   note: commit message saved in .hg/last-message.txt
   abort: pretxncommit hook exited with status * (glob)
+  [255]
+  $ cat .hg/last-message.txt
   another precious commit message
 
 .hg/last-message.txt:
--- a/tests/test-ssh.t	Fri Oct 08 22:36:10 2010 -0500
+++ b/tests/test-ssh.t	Fri Oct 08 22:36:11 2010 -0500
@@ -52,7 +52,7 @@
 
 non-existent absolute path
 
-  $ hg clone -e "python ./dummyssh" ssh://user@dummy//$HGTMP/nonexistent local
+  $ hg clone -e "python ./dummyssh" ssh://user@dummy//`pwd`/nonexistent local
   remote: abort: There is no Mercurial repository here (.hg not found)!
   abort: no suitable response from remote hg!
   [255]
--- a/tests/test-tag.t	Fri Oct 08 22:36:10 2010 -0500
+++ b/tests/test-tag.t	Fri Oct 08 22:36:11 2010 -0500
@@ -186,13 +186,13 @@
 
 test custom commit messages
 
-  $ cat > $HGTMP/editor <<'__EOF__'
+  $ cat > editor << '__EOF__'
   > #!/bin/sh
   > echo "custom tag message" > "$1"
   > echo "second line" >> "$1"
   > __EOF__
-  $ chmod +x "$HGTMP"/editor
-  $ HGEDITOR="'$HGTMP'"/editor hg tag custom-tag -e
+  $ chmod +x editor
+  $ HGEDITOR="'`pwd`'"/editor hg tag custom-tag -e
   $ hg log -l1 --template "{desc}\n"
   custom tag message
   second line