WindowsXP, Mercurial1.6で試した。
Q:\_sandbox\repo\.hg\hgrc
[hooks] commit = "Q:\_sandbox\repo\.hg\test.py"
Q:\_sandbox\repo\.hg\test.py
import os print "hello" for k,v in os.environ.iteritems(): if k.startswith("HG"): print "%s=%s" % (k, v)
フックを動かしてみる
Q:\_sandbox\repo>hg ci -m test hello HG_NODE=ececd2346b0a9e922ead35c4ffe8463ec11e5f21 HG=C:\Program Files\Mercurial\hg.exe HG_PARENT1=c36d660eb936a30e7c30c5e21e6e006351302641 HG_PARENT2=