delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/11/08/10:59:10

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <CAGCLmzwrf31p8GQaw-55N5UMD+w==xzakSzzVTGrbPkDP-hFdg@mail.gmail.com>
References: <CAGCLmzztLn88uAcD5RzZAyYoPv8mLd0-Kx9gntmbdSObkG44Gg AT mail DOT gmail DOT com> <509BAF8C DOT 2060102 AT cs DOT utoronto DOT ca> <CAGCLmzwrf31p8GQaw-55N5UMD+w==xzakSzzVTGrbPkDP-hFdg AT mail DOT gmail DOT com>
Date: Thu, 8 Nov 2012 16:58:53 +0100
Message-ID: <CAGCLmzwmba26YeNsYz1x=nQSMexsOmJe9xy+x1ruwQTPKKppbA@mail.gmail.com>
Subject: Re: Info for the item "does patch.exe work different than other unx patch tools?" (i.e. "hunk 1 out of 3 hunks failed")
From: =?ISO-8859-1?Q?Thomas_H=F6henleitner?= <thomas DOT hoehenleitner AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id qA8Fx60P016659

May be because of the attatched file the mail before is not delivered..

Here is a temporary link to the attached file:
https://www.dropbox.com/s/7etntr4jukp9t5l/ExamplePatch.zip


2012/11/8 Thomas Höhenleitner <thomas AT seerose DOT net>:
> Hello Ryan,
>
> first I appologize for the wrong hunks-failed info. I did not remeber
> it correctly as I wrote the mail.
>
> *    "3 out of 3 hunks FAILED" is what patch tells exactly in example.
> *    I tried patch with the -l switch without success before.
> *    Also --ignore-all-space I use with diff (what is -w and probably
> implies -b)
> *    now I tried also the switch -a with diff: no difference
>
> I created a small example to play with and added it as zip file to this mail.
>
> Best regards,
>
> Thomas
>
> 2012/11/8 Ryan Johnson <ryan DOT johnson AT cs DOT utoronto DOT ca>:
>> On 08/11/2012 5:30 AM, Thomas Höhenleitner wrote:
>>>
>>> Hello,
>>>
>>> using Cygwin patch.exe in a batch file I ran into the problem that
>>> patch failed for some reason ("hunk 1 out of 3 hunks failed"):
>>>
>>> Investigating this issue I found that inserting "unix2dos my.patch"
>>> before applying the patch was my friend!
>>> Being paranoid I tried  "dos2unix my.patch" before applying the patch
>>> - and it was my friend too!
>>
>> I've hit problems trying to apply a dos-like patch to a unix-like file, and
>> vice-versa, but not what you describe. Also, problems with line endings tend
>> to go all-or-nothing: either all hunks fail (all line endings differ), or
>> all succeed in the absence of other conflicts.
>>
>> I almost wonder if the file you edited somehow got inconsistent line endings
>> only for the changed lines; that would imply that the two successful hunks
>> have only insertions and/or deletions, while the failed hunk has actual
>> changes.
>>
>> Hard to say without seeing the files involved, tho. Also, did you try -b/-w
>> with diff, and/or -l with patch?
>>
>> Ryan
>>
>>
>>
>> --
>> Problem reports:       http://cygwin.com/problems.html
>> FAQ:                   http://cygwin.com/faq/
>> Documentation:         http://cygwin.com/docs.html
>> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019