[PATCH 1 of 1] patch: generate .rej wihtout eol adaptation

Shun-ichi Goto shunichi.goto at gmail.com
Thu Dec 2 07:52:11 CST 2010


2010/12/2 Mads Kiilerich <mads at kiilerich.com>:
> On 12/02/2010 02:16 PM, Shun-ichi Goto wrote:
>>
>> 2010/12/2 Mads Kiilerich<mads at kiilerich.com>:
>>>>
>>>> To reproduce this issue:
>>>>  1. make taget file having CRLF line ending
>>>>  2. make patch file having CRLF content line ending
>>>>  3. prepare patch which would conflict
>>>>  4. applying patch with option 'patch.eol=auto'
>>>>  5. check .rej file has CRCRLF<= incorrect!
>>>
>>> Could this reproducer description go into a test in the test suite?
>>
>> I only have a simple shell script because I'm not familiar with hg's test
>> suit.
>
> See http://mercurial.selenic.com/wiki/WritingTests

Studying...

> Writing tests this way is not only a boring task, but also a nice tool when
> investigating and documenting issues and developing fixes.
>
>> And it use mq (qpush) to kick patching as I experienced.
>> (Note that it has ^M code)
>
> The script you gave can be transformed quite straight forward:

Thanks a lot and perfect!
Your script can catch the issue, and passed with my patch.
I'll resend the patch with test later.

-- 
Shun-ichi GOTO


More information about the Mercurial-devel mailing list