[MERGE] Merge Check EOL plugin into the core.

Alexander Belchenko bialix at ukr.net
Wed Mar 12 04:50:18 GMT 2008


James Westby пишет:
> On Tue, 2008-03-11 at 15:32 +0200, Alexander Belchenko wrote:
>> From help topic:
>>
>> 	The 'checkeol' plugin installs special pre-commit hook to Bazaar VCS.
>> 	This hook allows you to check content of committed files for kind
>> 	of line-endings. If your project has strict policy about style of
>> 	source files you could automate EOL check with such plugin.
>> 	If some of committed files will have inappropriate line-endings
>> 	commit will be aborted.
>>
>> Here is the patch to merge this plugin into the core.
> 
> Hi Alexander,
> 
> Thanks for submitting this, I think it would make a valuable addition
> to the core.
> 
> The code looks pretty sane to me, so I don't have any comments on that.
> 
> My only comment would be, does including this prejudice any work that
> may happen in the future to support line endings in a more flexible way?
> For instance, could the .bzreol file specify all that is wanted for 
> that?

The problem with such config file as the base for line endings support
is renames. So if you have listed full file names in .bzreol and at some
point you rename file -- then you lose link between config and state of
real tree. It's a problem that I discussed with Dima Vasiliev in ru_bzr
discussion group.

So sane solution should be using some sort of versioned properties
in inventory/dirstate, i.e. inside .bzr/checkout directory.
Because I believe such info should be easily available at checkout time.

Config file in the root of the WT does not fulfill this requirement.

So my answer is no. I think proper future support of line-endings should
automatically follow renames/moves in WT. Or using file-ids instead of
filenames to attach properties for inventory items.

> I don't think this should preclude the plugin being merged, I just
> wondered if you had considered the issue.

Every time in the past discussion about line endings started it's every time
stumbled upon versioned properties. I think it's a crucial part here.

So in the future it's possible to Check EOL hook and line endings support
to coexist in the same time in the same WT, IMO.



More information about the bazaar mailing list