tests/test-hook
author mpm@selenic.com
Mon, 27 Jun 2005 22:18:12 -0800
changeset 487 2ad41189bee5
child 749 7e4843b7efd2
permissions -rwxr-xr-x
Add initial hook support -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Add initial hook support This adds the basic hook code as well as pre and post-commit hooks. Argument passing is by environment variable key/value pairs so that extra data can be passed over time. File lists will generally not be passed to hooks as these can be extremely long (>1M). manifest hash: 45cf9bab432782c391bc9c1c048c84cc75d52740 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCwOukywK+sNU5EO8RAsVsAJ9QipR2aKRSSvoRNo+3If6JddUDkwCgkZrM KEmZpUOxhNHqezFVrHDRTjE= =aedm -----END PGP SIGNATURE-----
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
487
2ad41189bee5 Add initial hook support
mpm@selenic.com
parents:
diff changeset
     1
#!/bin/sh -x
2ad41189bee5 Add initial hook support
mpm@selenic.com
parents:
diff changeset
     2
2ad41189bee5 Add initial hook support
mpm@selenic.com
parents:
diff changeset
     3
hg init
2ad41189bee5 Add initial hook support
mpm@selenic.com
parents:
diff changeset
     4
echo "[hooks]" > .hg/hgrc
2ad41189bee5 Add initial hook support
mpm@selenic.com
parents:
diff changeset
     5
echo 'precommit = echo precommit hook' >> .hg/hgrc
2ad41189bee5 Add initial hook support
mpm@selenic.com
parents:
diff changeset
     6
echo 'commit = echo commit hook: $NODE' >> .hg/hgrc
2ad41189bee5 Add initial hook support
mpm@selenic.com
parents:
diff changeset
     7
echo a > a
2ad41189bee5 Add initial hook support
mpm@selenic.com
parents:
diff changeset
     8
hg add a
2ad41189bee5 Add initial hook support
mpm@selenic.com
parents:
diff changeset
     9
hg commit -t "test" -u test -d "0 0"