[issue2925] Allow 'precommit'-hook to access context

Tim Brugman bugs at mercurial.selenic.com
Tue Jul 26 13:57:14 CDT 2011


New submission from Tim Brugman <tim at mag.ik.nu>:

For issue tracker integration it can be useful to review and possibly
automatically correct/extend the context information of a commit.

For example; our company has the wish to add the title of associated issue
to the commit message.
Another example; if the developer did not mention the issue number in the
commit message the hook should be able to pop-up a list of issues to choose
and then fill it into the commit message automatically.

This all is currently not possible because there is no hook that can change
the commit message.
We solved this in our local installation by simply passing the commit
context (cctx) as an extra argument in the 'precommit' hook call
('localrepo.py', commit function).

I think this can be very useful for issue tracker integration in general,
not only for our company, and therefore hope this will end up in the main
distribution.

----------
messages: 16979
nosy: tim
priority: feature
status: unread
title: Allow 'precommit'-hook to access context

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2925>
____________________________________________________


More information about the Mercurial-devel mailing list