tests: remove the last traces of $HGTMP

$HGTMP isn't needed - and if we need something like that then $TESTTMP is more
appropriate.
This commit is contained in:
Mads Kiilerich 2010-10-08 22:36:11 -05:00
parent b226586b49
commit a8aa4fec4a
6 changed files with 15 additions and 14 deletions

View File

@ -48,8 +48,7 @@ elif url.startswith("remote:http"):
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()

View File

@ -85,17 +85,18 @@ import URL
$ 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

View File

@ -141,7 +141,7 @@ pull (minimal config)
(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 @@ fail for config file is missing
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

View File

@ -74,17 +74,18 @@ rollback by pretxncommit saves commit message (issue 1635)
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:

View File

@ -52,7 +52,7 @@ repo not found error
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]

View File

@ -186,13 +186,13 @@ tag and branch using same name
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