changeset 4634:73bf2b586f3f

Use printenv.py for pre/post-command-hooks (fixes tests on Solaris, too)
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 19 Jun 2007 08:17:55 +0200
parents ff7253a0d1da
children 63b9d2deed48
files tests/test-hook tests/test-hook.out
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-hook	Tue Jun 19 08:06:37 2007 +0200
+++ b/tests/test-hook	Tue Jun 19 08:17:55 2007 +0200
@@ -11,9 +11,9 @@
 echo 'precommit = unset HG_LOCAL HG_NODE HG_TAG; python ../printenv.py precommit' >> .hg/hgrc
 echo 'pretxncommit = unset HG_LOCAL HG_TAG; python ../printenv.py pretxncommit' >> .hg/hgrc
 echo 'pretxncommit.tip = hg -q tip' >> .hg/hgrc
-echo 'pre-identify = false' >> .hg/hgrc
-echo 'pre-cat = echo "meow $HG_ARGS"' >> .hg/hgrc
-echo 'post-cat = echo "purr $HG_RESULT"' >> .hg/hgrc
+echo 'pre-identify = python ../printenv.py pre-identify 1' >> .hg/hgrc
+echo 'pre-cat = python ../printenv.py pre-cat' >> .hg/hgrc
+echo 'post-cat = python ../printenv.py post-cat' >> .hg/hgrc
 echo a > a
 hg add a
 hg commit -m a -d "1000000 0"
--- a/tests/test-hook.out	Tue Jun 19 08:06:37 2007 +0200
+++ b/tests/test-hook.out	Tue Jun 19 08:17:55 2007 +0200
@@ -22,9 +22,10 @@
 3:4c52fb2e4022
 commit hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 
 commit.b hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 
+pre-identify hook: HG_ARGS=id 
 warning: pre-identify hook exited with status 1
-meow cat b
-purr 0
+pre-cat hook: HG_ARGS=cat b 
+post-cat hook: HG_ARGS=cat b HG_RESULT=0 
 b
 prechangegroup hook: HG_SOURCE=pull HG_URL=file: 
 changegroup hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_SOURCE=pull HG_URL=file: