diff tests/test-hook @ 2266:3f7692b0ff13

hooks: add preupdate and update hooks. preupdate run before working dir updated. can prevent update. update run after working dir updated.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Thu, 11 May 2006 10:14:48 -0700
parents 4f072bb06e89
children e506c14382fd
line wrap: on
line diff
--- a/tests/test-hook	Thu May 11 09:44:11 2006 -0700
+++ b/tests/test-hook	Thu May 11 10:14:48 2006 -0700
@@ -61,6 +61,14 @@
 hg commit -m 'fail' -d '4 0'
 hg -q tip
 
+# preupdate hook can prevent update
+echo 'preupdate = echo preupdate hook: p1=$HG_PARENT1 p2=$HG_PARENT2' >> .hg/hgrc
+hg update 1
+
+# update hook
+echo 'update = echo update hook: p1=$HG_PARENT1 p2=$HG_PARENT2 err=$HG_ERROR' >> .hg/hgrc
+hg update
+
 # prechangegroup hook can prevent incoming changes
 cd ../b
 hg -q tip