[MERGE] Introduced .eoltype and non-(CR, CRLF, LF) check.

Martin Pool mbp at canonical.com
Mon Mar 10 22:28:55 GMT 2008


On 08/03/2008, Alexander Belchenko <bialix at ukr.net> wrote:
> Eugene Wee пишет:
>  > Hi Alexander,
>  >
>  > In my previous "feature request" email I suggested configuring checkeol
>  > to check for line endings other than a specified type. I decided to try
>  > and work a solution out myself.
>  >
>  > Basically, I introduced a .eoltype file that takes just one word: either
>  > CR, LF, or CRLF. If CR (or LF or CRLF) is the word, then files checked
>  > and found to have non-CR (or non-LF or non-CRLF) line endings will cause
>  > the commit to abort. The default is LF.
>
>  Thank you for your patch.
>  But I actually prefer to not introduce new additional files in working tree,
>  but change format of .checkeol instead. For now I'm leaning towards sections
>  in this file and groups file masks together in sections. Something like this:
>
>  --------------- .checkeol ----------------------
>  [CRLF]
>  *.txt
>
>  [LF]
>  *.py
>  ------------------------------------------------
>
>  I forward this message to bazaar ML so maybe other people will comment
>  as well.

I think the purpose would be more clear if it was called .bzreol or some such.

We might want to use this either to produce a particular type of line
endings, or to refuse to commit if it's not right.  Even if only the
latter is implemented at the moment maybe we should leave room for it.

The grouping seems odd because its like an ini file but not quite.

How about a glob per line like in .bzrignore, like this

*.py          require lf

-- 
Martin


More information about the bazaar mailing list