diff tests/test-hook @ 8907:e9ef409e6399

Add (pre)outgoing hooks for local clones.
author Fred Wulff <frew@cs.stanford.edu>
date Fri, 17 Apr 2009 16:34:43 -0700
parents 7a7d4937272b
children 87c05a78e588
line wrap: on
line diff
--- a/tests/test-hook	Tue Jun 23 14:14:48 2009 +0200
+++ b/tests/test-hook	Fri Apr 17 16:34:43 2009 -0700
@@ -107,6 +107,19 @@
 echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> ../a/.hg/hgrc
 hg pull ../a
 
+# outgoing hooks work for local clones
+cd ..
+echo '[hooks]' > a/.hg/hgrc
+echo 'preoutgoing = python ../printenv.py preoutgoing' >> a/.hg/hgrc
+echo 'outgoing = python ../printenv.py outgoing' >> a/.hg/hgrc
+hg clone a c
+rm -rf c
+
+# preoutgoing hook can prevent outgoing changes for local clones
+echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> a/.hg/hgrc
+hg clone a zzz
+cd b
+
 cat > hooktests.py <<EOF
 from mercurial import util