Change Made this basic hook to prevent branch name mismatch and bugID message errors. https://gist.github.com/2583189
So basically the idea is that the hook should add โBugID: xyzโ to the end of the commit messages if the branch name looks like bug_123 or feature_123. However, I am having trouble finding how to do this, since most pretxncommit user examples do not want to change the description of the change set.
This is what I still have. It updates .hg / commit.save with the correct message, but this message is never passed to the commit. However, it appears in the default message box (tortoiseshell) of the next commit. Maybe pretxncommit is not the right hook?
Can I use the precommit hook, read the commit.save file and repo ['tip']. branch () and change what, if so, where would I get the branch name from?
#
In a slightly unrelated note, if someone from the Fogbugz / Kiln team sees this ... please update your software to read the branch name, I will not need to point BugID: x to every damned commit. First of all, I spend my time. Secondly, if the case identifier is incorrectly printed, it will not be displayed on the error without a lot of noise. Many developers use a branch for each error / function system. This is the policy of the company where I work. Fogbugz sucks.
python mercurial mercurial-hook
Keyo
source share