Subject: RE: A problem with the patch utility and windows paths.
From: "Bob Rundle" <[email-masked]>
To: "'Eric Blake'" <[email-masked]>
Cc: <[email-masked]>
Date: Fri, 30 Sep 2005 08:23:56 -0600

Here is a reproducible script

$ mkdir old
$ mkdir new
$ cat >old/file
Line1
Asdf
Line2
^D
$ cat >new/file
Line1
Fdsa
Line2
^D
$ diff -u old new >1.tm
$ patch <1.tm

The last command gives the error

can't find file to patch at input line 4
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -u old/file new/file
|--- old/file   2005-09-30 08:15:00.796875000 -0600
|+++ new/file   2005-09-30 08:16:18.796875000 -0600
--------------------------
File to patch:

If then you simply enter old/file at the prompt, then patch works.  This is
a clear indication that there is a problem with the tool's interpretation of
a windows path.

This is not a case of "I don't know how patch works."  I have been using
patch for a long time.  It is simply not working.

-----Original Message-----
From: Eric Blake [mailto:[email-masked]] 
Sent: Thursday, September 29, 2005 9:40 PM
To: Bob Rundle
Cc: [email-masked]
Subject: Re: A problem with the patch utility and windows paths.

According to Bob Rundle on 9/29/2005 8:27 AM:
> Greetings,
> 
> I've having a few issues with the patch utility.  It is not working with
> windows paths.  I am using Windows XP and the latest cygwin patch.  Any
help
> is appreciated.  Attached is the cygcheck file.
> 
> If I have two directories "oldversion" and "newversion"
> 
> $ diff -u oldversion newversion >1.tm
> $ patch <1.tm

What error message are you getting that you think is not right?  Did you
use the -p option?  We need a reproducible test case.  Also, it may help
to follow these directions:

> Problem reports:       http://cygwin.com/problems.html

- --
Life is short - so eat dessert first!

Eric Blake             [email-masked]

--
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/