delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/19/11:24:42

X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
References: <023e01c7331f$38720df0$a501a8c0 AT CAM DOT ARTIMI DOT COM> <45A55E97 DOT 8050600 AT web DOT de> <45B0DCFD DOT 7080508 AT web DOT de>
Subject: RE: How to resolve hiccups by patch program?
Date: Fri, 19 Jan 2007 16:24:03 -0000
Message-ID: <000c01c73be6$3ba03360$a501a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <45B0DCFD.7080508@web.de>
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

On 19 January 2007 15:00, Markus Elfring wrote:

> Are potential line ending variations the only reason for the reported
> change rejections?
> Do other details result also in a mismatch?

  Yes; if patch can't find anything that corresponds to the unaltered lines at
the start and end of the hunk, it doesn't know where to put it; if the lines
that it finds there don't match what the patch says the old versions look
like, it also doesn't work.

file.txt:
1 alpha 
2 bravo
3 charlie
4 delta
5 echo 
6 foxtrot
7 golf
8 hotel 
9 india


example bad patch hunk #1: old lines don't match

@@
 3 charlie
 4 delta
-5 wibble wobble blort
+5 echo echo
 6 foxtrot 
 7 golf

example bad patch hunk #2: location of patch can't be found
@@
 foo
 bar
-5 echo
+5 echo echo
 baz
 quux


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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

- Raw text -


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