monotone-devel
[Top][All Lists]
Advanced

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

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


From: Thomas Keller
Subject: Re: [Monotone-devel] Hook for source code beautifier?
Date: Thu, 08 Mar 2007 16:51:15 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20060911)

Boris schrieb:
> 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?

Take a look at the note_netsync_revision_received hook
(http://monotone.ca/docs/Hooks.html#Hooks).

Be aware that such an implementation would create new revisions which
would form new heads (even if the beautifier doesn't change anything but
whitespaces, because this would change the manifest and the revision
therfor). If you then try to merge those, you probably would get a lot
of conflicts. One could work around that by disapproving the original
revision, but this only works well if there are no children of the
revision in question yet.

So in the end I guess there is no easy way to accomplish what you want.

Thomas.

-- 
ICQ: 85945241 | SIP: 1-747-027-0392 | http://www.thomaskeller.biz
> Guitone, a frontend for monotone: http://guitone.thomaskeller.biz
> Music lyrics and more: http://musicmademe.com




reply via email to

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