equal
deleted
inserted
replaced
58 |
58 |
59 # precommit hook can prevent commit |
59 # precommit hook can prevent commit |
60 echo 'precommit.forbid = echo precommit.forbid hook; exit 1' >> .hg/hgrc |
60 echo 'precommit.forbid = echo precommit.forbid hook; exit 1' >> .hg/hgrc |
61 hg commit -m 'fail' -d '4 0' |
61 hg commit -m 'fail' -d '4 0' |
62 hg -q tip |
62 hg -q tip |
|
63 |
|
64 # preupdate hook can prevent update |
|
65 echo 'preupdate = echo preupdate hook: p1=$HG_PARENT1 p2=$HG_PARENT2' >> .hg/hgrc |
|
66 hg update 1 |
|
67 |
|
68 # update hook |
|
69 echo 'update = echo update hook: p1=$HG_PARENT1 p2=$HG_PARENT2 err=$HG_ERROR' >> .hg/hgrc |
|
70 hg update |
63 |
71 |
64 # prechangegroup hook can prevent incoming changes |
72 # prechangegroup hook can prevent incoming changes |
65 cd ../b |
73 cd ../b |
66 hg -q tip |
74 hg -q tip |
67 echo '[hooks]' > .hg/hgrc |
75 echo '[hooks]' > .hg/hgrc |