Lessons learned from handling text end-of-line conventions?

Alexander Belchenko bialix at ukr.net
Thu Aug 6 09:30:52 BST 2009


Ben Finney пишет:
> Alexander Belchenko <bialix at ukr.net> writes:
> 
>> Ben Finney пишет:
>>> Over on Python's development list, in duscussion of migration of the
>>> code base from Subversion to Mercurial, a sub-thread has arisen over
>>> the differences in capability for handling end-of-line conventions
>>> in files.
>> Link?
> 
> I don't have a URL to hand, but the (long!) thread starts with
> Message-ID: <ea2499da0908030341l763c7340v7329a66da6c026d0 at mail.gmail.com>.
> 

The problem has good summary in PEP-358 IIUC:

---------------------------------------------
End-of-line conversions

There has been some discussion about the lack of end-of-line conversion 
support in Mercurial. While Mercurial comes with a win32text extension 
that provides some basic support for converting end-of-line data on a 
file-name pattern basis, the lack of exclusion (for specifying broad 
rules with exceptions) and the use of hgrc files (which can't be 
versioned) make it less than ideal.

I think the primary line of defense for prevention of inappropriate 
newlines should be hooks on the server side which basically turn down 
any changegroup or changeset introducing such data. The use of the 
win32text extension (which can hopefully be improved/extended to support 
the usage scenarios mentioned above) and/or a commit-time hook could be 
the first line of defense.
---------------------------------------------

Although many people in this list have something to say about this 
problem (and me have the different opinion) but unlikely this will be 
interested for hg, because bzr still has no proper integral support for 
this problem and suffers from similar issues.




More information about the bazaar mailing list