Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Fri, 9 Apr 2004 10:28:48 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com cc: Bruce Dobrin Subject: Re: Is "Patch" broken? In-Reply-To: <6.0.1.1.0.20040408173009.028c01e8@127.0.0.1> Message-ID: References: <20040408190219 DOT 19916 DOT qmail AT web12405 DOT mail DOT yahoo DOT com> <04ed01c41daf$5667c4e0$4d1f1cac AT THEODOLITE> <6 DOT 0 DOT 1 DOT 1 DOT 0 DOT 20040408173009 DOT 028c01e8 AT 127 DOT 0 DOT 0 DOT 1> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.39 On Thu, 8 Apr 2004, Larry Hall wrote: > At 05:20 PM 4/8/2004, you wrote: > >...is my usage broken? > > > >I haven't used Patch in a while, but I've been trying to patch > >DBD::Oracle1.15, and the seemingly innocuous patch is being totally > >rejected: > > > >dobrin AT THEODOLITE:/c/temp/DBI/patched-DBDO1.15> patch -p0 -F 3 < pch.1 > >patching file dbd-oracle/trunk/Oracle.xs > >Hunk #1 FAILED at 157. > >1 out of 1 hunk FAILED -- saving rejects to file > >dbd-oracle/trunk/Oracle.xs.rej > >dobrin AT THEODOLITE:/c/temp/DBI/patched-DBDO1.15> diff > >./dbd-oracle/trunk/Oracle.xs.orig ./dbd-oracle/trunk/Oracle.xs > > > > > >I've looked over the patch, the offsets and patterns look fine. I even > >changed the files to all access and ran the patch thru d2u, but it still > >rejects all lines. > >I'd REALLY like to avoid cutting and pasting all the changes.... Does > >anyone have any suggestions ( I figure it's mightr be a control character > >thing, but I'd think patch usually deals well with that) > > No, patch isn't broken. Check your patch file for a mismatch of line > endings (DOS vs UNIX or vice versa). That's the only things I can think > of off the top of my head without more specifics. Bruce, I've worked a lot with patches, and sometimes it's very hard to spot a tiny difference (not just trailing spaces or line ending mismatches, for which you could have simply used the "-l" flag). What I usually do is take the produced .rej file, edit the "before" part to get rid of the two leading spaces that patch inserts, and compare it via diff (or, better yet, vimdiff, as it highlights the *actual* changes, not just the lines) to the corresponding chunk of the original code. This approach, of course, is not Cygwin-specific. HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- 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/