Forcing mandatory checks on repositories

Frits Jalvingh jal at etc.to
Wed Feb 25 01:25:48 GMT 2009


Hello all,

I'm the currently very unhappy owner of a number of Bazaar branches where 
files use all kinds of line endings, character encodings and source format 
layouts. Clearly just telling developers to correctly configure their tools 
does not work 8-(

I need to fix this horrible mess which is bad enough since every line ending 
change causes a full-file delta, making merges hell. And we merge a lot, 
from "old" releases upward to new ones, and this will now be problematic.

However I *really* want to prevent this from ever happening again. So I looked 
into "hooking" the commit process so that I can check files before they are 
accepted.
As far as I can see I cannot properly use this though since there seems to be 
no way to force all commits in a repository /and it's branches/ to go through 
a plugin -the plugin is used only when installed. And since telling my 
developers to use a single line ending doesn't work telling them to install 
my plugin  will surely fail also.

Since we use a set of main repositories on a server I then looked at capturing 
a push on the server before it was committed into the server copy of the 
repo; if I could "see" the new version of the repo before it was written I 
might be able to do the check then. But this seems to be impossible - the 
only hook I found is a post-push one. Given the nature of push this seems 
hard anyway.

It would be great if I could add plugins to the /repository/, perhaps 
in .bzr/plugins or something, in such a way that the plugins are part of the 
branch and are checked out and automagically used when bazaar is used on that 
branch. In that way I could add a check plugin into the branch to check and 
all would be well...

Does anyone know of a way to ensure that checks are done, preferably at commit 
time? I will look at things like PQM but would prefer to use bazaar only.

Thanks in advance and hoping for an answer,

Frits Jalvingh



More information about the bazaar mailing list