monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] [patch] adding branchname to parameters for validate_co


From: Marcel van der Boom
Subject: [Monotone-devel] [patch] adding branchname to parameters for validate_commit_message
Date: Mon, 18 Sep 2006 19:35:08 +0200

Included is a small patch which adds branchname as a third parameter for the validate_commit_message.

Rationale:
We use the validate_commit_message to run a set of lua coded checks which run over the files which are present in the revision about to be committed. Things like coding standards, tab/space, xml conformance etc. Those checks are present in a dedicated branch which our common rc file looks for and, if present, runs those checks. If one of the checks fail, the validation of the commit message returns false, cancelling the commit. For different branches the checks may be different, but we could not distinguish between them as there's no way to get to the name of the branch in that hook.
I was sort of hoping this line in the NEWS file:

 - 'mtn status' now includes the branch name and parent
    revision id in its output.

would also put that information in the basic_io for the second parameter in the hook. Seeing that it doesnt, here's a patch which adds the branchname explicitly :-)

marcel

Attachment: valbranch.patch
Description: Binary data


PS
A new pre-commit hook would be better maybe, but i'd have considerable trouble personally in finding out where to call that hook exactly.

--
Marcel van der Boom
HS-Development BV               --   http://www.hsdev.com
So! webapplicatie framework  --   http://make-it-so.info


Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]