Use printenv.py for pre/post-command-hooks (fixes tests on Solaris, too)

This commit is contained in:
Thomas Arendsen Hein 2007-06-19 08:17:55 +02:00
parent 483231d996
commit 3dcf92c53d
2 changed files with 6 additions and 5 deletions

View File

@ -11,9 +11,9 @@ echo 'commit.b = unset HG_LOCAL HG_TAG; python ../printenv.py commit.b' >> .hg/h
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"

View File

@ -22,9 +22,10 @@ pretxncommit hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1
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: