commit message validation, or template commit form?

Steve Borho steve at borho.org
Tue Dec 19 15:20:15 UTC 2006


On Tuesday 19 December 2006 03:47, Georg wrote:
> Hi,
>
> I keep forgetting to supply some vital information, e.g. bug id references,
> in my commit messages.
>
> Is there a way to plug in some validation code for the commit message, e.g.
> some formal check whether a bug id was referenced?  I'm not after a bullet
> proof solution that validates ticket numbers, checks whether they are
> assigned to me etc., a simple syntactical check of the message would be
> sufficient.
>
> Acutally it would even help if hg commit (or qct, for that matter ;-) )
> could present me with a default "fill in the blanks" kind of form when I
> commit.

This could go into qct fairly easily.  I could add a vcs back-end function to 
ask for a commit message template each time the message is cleared.
Inside the hg back-end it could read a file location from ~/.hgrc

Validating the log message, however, should be done via a pre-commit hook

-- 
Steve Borho (steve at borho.org)
http://www.borho.org/~steve/steve.asc
Key fingerprint = 2D08 E7CF B624 624C DE1F  E2E4 B0C2 5292 F2C6 2C8C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20061219/7234e048/attachment-0001.asc>


More information about the Mercurial mailing list