monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Re: Hook for source code beautifier?


From: Lapo Luchini
Subject: [Monotone-devel] Re: Hook for source code beautifier?
Date: Thu, 08 Mar 2007 16:53:12 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20070129)

Boris wrote:
> If I want to run a source code beautifier automatically (for example
> when code is received) is there a hook I can use? I think the code would
> need to be checked out first, formatted in a workspace and checked in
> again which is probably not as easy as telling monotone somehow to use
> code beautifier X for newly received code?

Commit hooks are executed on the computer on which the commit is done,
so you'd have to distribute the beautifier to every developer too.
The is an hook on "revision received by netsync" too, but at that stage
it's too late: once committed, the revision can't possibly change
without breaking all the digital signatures.

Another approach would be to have a computer constantly sync'ed and
updated and execute the beautifier nightly, with a clever script that
would commit only if something was in fact changed by the beautifier.

It depends if you want "ugly things" to NEVER creep in the DB, or you
only want they to generally stay close to not-ugliness.

Notice that this kind of things don't usually play nice with merge, as a
beautifier usually changes MANY lines for LITTLE reasons... (this would
be an argument to use the on-commit method)

    Lapo





reply via email to

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