diff tests/test-hook @ 4630:e6d105a51ec7

dispatch: add generic pre- and post-command hooks
author Matt Mackall <mpm@selenic.com>
date Mon, 18 Jun 2007 17:49:56 -0500
parents 97962a3e73cf
children 73bf2b586f3f
line wrap: on
line diff
--- a/tests/test-hook
+++ b/tests/test-hook
@@ -11,6 +11,9 @@ echo 'commit.b = unset HG_LOCAL HG_TAG; 
 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 a > a
 hg add a
 hg commit -m a -d "1000000 0"
@@ -35,6 +38,10 @@ hg commit -m b -d '1 0'
 hg merge 1
 hg commit -m merge -d '2 0'
 
+# test generic hooks
+hg id
+hg cat b 
+
 cd ../b
 hg pull ../a