Unexpected- error: pretxncommit.eol hook failed: end-of-line check failed:
Ernie Rael
err at raelity.com
Thu Apr 16 23:35:57 UTC 2015
On 4/16/2015 2:30 PM, Mads Kiilerich wrote:
> On 04/16/2015 04:53 PM, Ernie Rael wrote:
>> Hi all,
>>
>> Is this expected? I thought the "look for nulls" algorithm was
>> liberally applied...
>
> Yes. The eol extension will do what you tell it to do and apply the
> eol check on the patterns you configure. ** means all files - not just
> all "non-binary" files.
Got it, thanks. Makes sense. I finally put most of the stuff I work with
into the .hgeol patterns.
I've wondered if having the patterns there saves some performance.
Thinking about it, I guess the text files still have to be fully
scanned, I suppose it saves a little since the binary files don't need
scanning (but usually that null byte shows up quickly I'd guess)
-ernie
>
> The null byte detection is used in places where getting it wrong not
> would be fatal. It would however be quite fatal if eol cleanup was
> applied on a binary file that just happened to not contain any nulls.
> I do thus not think it would be a good idea to have a 'all text files'
> matcher in the eol based on (lack of) null bytes. It could _perhaps_
> make sense to have something that checked for no control characters at
> all and with something that really looks like all newline delimited
> lines.
>
> /Mads
>
>>
>> -ernie
>>
>> $ hg --version
>> Mercurial Distributed SCM (version 3.3.2)
>>
>> $ hg ci
>> error: pretxncommit.eol hook failed: end-of-line check failed:
>> .../ScenicView.jar in 00f2468dd899 should not have CRLF line endings
>>
>> $ od -c
>> metaphysical.workbench/ScenicView/release/modules/ext/ScenicView.jar
>> |head
>> 0000000 P K 003 004 \n \0 \0 \b \b \0 264 205 = E \0 \0
>> 0000020 \0 \0 002 \0 \0 \0 \0 \0 \0 \0 \t \0 \0 \0 M E
>> 0000040 T A - I N F / 003 \0 P K 003 004 \n \0 \0
>> 0000060 \b \b \0 264 205 = E w ' 211 r j \0 \0 \0 235
>> 0000100 \0 \0 \0 024 \0 \0 \0 M E T A - I N F /
>> 0000120 M A N I F E S T . M F 215 214 275 \n 203
>>
>> $ cat .hgeol
>> [patterns]
>> ** = native
>>
>> === from ~/.hgrc
>> [eol]
>> native = LF
>> only-consistent = False
>>
>> [hooks]
>> pretxncommit.eol = python:hgext.eol.checkheadshook
>>
>> _______________________________________________
>> Mercurial mailing list
>> Mercurial at selenic.com
>> http://selenic.com/mailman/listinfo/mercurial
>
>
>
More information about the Mercurial
mailing list