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


_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to