precommit and pre-commit hooks don't differ in THg, but do in hg
Created originally on Bitbucket by Christoph Jüngling
According to [1] there is a slight difference between mercurial's precommit and pre-commit hooks:
- precommit runs before the commit is performed
- pre-commit runs before the commit initially starts, i.e. before collecting the files to be committed
With the command line client of hg (version 2.3.2) this works fine, but in TortoiseHg 2.5.1 (Windows XP) there is no difference between those two settings:
#!ini
[hooks]
precommit = ...
pre-commit = ...
In THg the behaviour is in both cases, that the hook script is always performed after the files have been collected.
[1] http://lildude.co.uk/mercurial-precommit-isnt-entirely-pre