$ hg init hook-test $ cd hook-test $ echo '[hooks]' >> .hg/hgrc $ echo 'commit = echo committed $HG_NODE' >> .hg/hgrc $ cat .hg/hgrc [hooks] commit = echo committed $HG_NODE $ echo a > a $ hg add a $ hg commit -m 'testing commit hook' committed