A problem with the patch utility and windows paths.
Bob Rundle
rundle@rundle.com
Fri Sep 30 14:37:00 GMT 2005
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:ebb9@byu.net]
Sent: Thursday, September 29, 2005 9:40 PM
To: Bob Rundle
Cc: cygwin@cygwin.com
Subject: Re: A problem with the patch utility and windows paths.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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 ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDPLOf84KuGfSFAYARAis3AJ47wWQGByGFW0i3LgTGm24o40eRUgCeJgLg
7+47tGs/9ihiEy4FVReVxwo=
=7eZ1
-----END PGP SIGNATURE-----
--
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/
More information about the Cygwin
mailing list