* Re: patch(1) (Win32) and path separators
@ 2002-11-19 11:13 Parish
2002-11-19 11:15 ` Igor Pechtchanski
0 siblings, 1 reply; 7+ messages in thread
From: Parish @ 2002-11-19 11:13 UTC (permalink / raw)
To: cygwin
On 19/11/2002 18:14 Larry Hall (RFK Partners, Inc) stood on a soap-box
and preached to the unwashed masses:
> At 01:10 PM 11/19/2002, Parish wrote:
>>patch(1) on Win32 seems to insist on '\' rather than '/' in the paths in diffs. This is somewhat at odds with diff(1) which uses '/', even on Windows.
>>
>>According to the manpage there is no option to change this behaviour.
>>
>>I have d/l the sources but have yet to build it (am I correct that it needs gcc to build, i.e. won't build with MSVC++?) with the intention of making my own version that works with '/'.
>>
>>Can anyone confirm that there isn't an undocumented option (cmd line or build) to make it use '/'? If there isn't, why is it that the Windows version works this way, especially when diff(1) DTRT?
>
>
> What patch are you using? The Cygwin version works fine with '/'. I have
> to assume that since you mention the "Windows version" that your talking
No, the one installed by the cygwin setup program:
marder-1:/cygdrive/e/mozilla_src/mozilla{13}$ patch --version
patch 2.5
Copyright 1988 Larry Wall
Copyright 1997 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
written by Larry Wall with lots o' patches by Paul Eggert
marder-1:/cygdrive/e/mozilla_src/mozilla{14}$
This is what happens when I run it:
marder-1:/cygdrive/e/mozilla_src/mozilla{12}$ patch --dry-run <
../nsNativeAppSupportGtk.diff
can't find file to patch at input line 8
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|Index: xpfe/bootstrap/nsNativeAppSupportGtk.cpp
|===================================================================
|RCS file: /cvsroot/mozilla/xpfe/bootstrap/nsNativeAppSupportGtk.cpp,v
|retrieving revision 1.9
|diff -u -r1.9 nsNativeAppSupportGtk.cpp
|--- xpfe/bootstrap/nsNativeAppSupportGtk.cpp 29 Aug 2002 03:04:36
-00001.9
|+++ xpfe/bootstrap/nsNativeAppSupportGtk.cpp 17 Nov 2002 22:06:07 -0000
--------------------------
File to patch:
The file, nsNativeAppSupportGtk.cpp exists:
marder-1:/cygdrive/e/mozilla_src/mozilla{14}$ ls -l
xpfe/bootstrap/nsNativeAppSupportGtk.cpp
-rwx------ 1 marko None 3624 Nov 17 22:11
xpfe/bootstrap/nsNativeAppSupportGtk.cpp
marder-1:/cygdrive/e/mozilla_src/mozilla{15}$
> about a native port and not the patch that's available through Cygwin.
> If that's a proper assumption, you don't have the right forum to discuss the
> Windows native version of patch. This list discusses Cygwin-related issues
> only.
>
> Sorry,
>
>
>
>
>
> Larry Hall lhall@rfk.com
> RFK Partners, Inc. http://www.rfk.com
> 838 Washington Street (508) 893-9779 - RFK Office
> Holliston, MA 01746 (508) 893-9889 - FAX
>
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: patch(1) (Win32) and path separators
2002-11-19 11:13 patch(1) (Win32) and path separators Parish
@ 2002-11-19 11:15 ` Igor Pechtchanski
2002-11-19 11:20 ` Parish
0 siblings, 1 reply; 7+ messages in thread
From: Igor Pechtchanski @ 2002-11-19 11:15 UTC (permalink / raw)
To: Parish; +Cc: cygwin
On Tue, 19 Nov 2002, Parish wrote:
> On 19/11/2002 18:14 Larry Hall (RFK Partners, Inc) stood on a soap-box
> and preached to the unwashed masses:
>
> > At 01:10 PM 11/19/2002, Parish wrote:
> >>patch(1) on Win32 seems to insist on '\' rather than '/' in the paths in diffs. This is somewhat at odds with diff(1) which uses '/', even on Windows.
> >>
> >>According to the manpage there is no option to change this behaviour.
> >>
> >>I have d/l the sources but have yet to build it (am I correct that it needs gcc to build, i.e. won't build with MSVC++?) with the intention of making my own version that works with '/'.
> >>
> >>Can anyone confirm that there isn't an undocumented option (cmd line or build) to make it use '/'? If there isn't, why is it that the Windows version works this way, especially when diff(1) DTRT?
> >
> >
> > What patch are you using? The Cygwin version works fine with '/'. I have
> > to assume that since you mention the "Windows version" that your talking
>
> No, the one installed by the cygwin setup program:
>
> marder-1:/cygdrive/e/mozilla_src/mozilla{13}$ patch --version
> patch 2.5
> Copyright 1988 Larry Wall
> Copyright 1997 Free Software Foundation, Inc.
>
> This program comes with NO WARRANTY, to the extent permitted by law.
> You may redistribute copies of this program
> under the terms of the GNU General Public License.
> For more information about these matters, see the file named COPYING.
>
> written by Larry Wall with lots o' patches by Paul Eggert
> marder-1:/cygdrive/e/mozilla_src/mozilla{14}$
>
> This is what happens when I run it:
>
> marder-1:/cygdrive/e/mozilla_src/mozilla{12}$ patch --dry-run <
> ../nsNativeAppSupportGtk.diff
> can't find file to patch at input line 8
> Perhaps you should have used the -p or --strip option?
> The text leading up to this was:
> --------------------------
> |Index: xpfe/bootstrap/nsNativeAppSupportGtk.cpp
> |===================================================================
> |RCS file: /cvsroot/mozilla/xpfe/bootstrap/nsNativeAppSupportGtk.cpp,v
> |retrieving revision 1.9
> |diff -u -r1.9 nsNativeAppSupportGtk.cpp
> |--- xpfe/bootstrap/nsNativeAppSupportGtk.cpp 29 Aug 2002 03:04:36
> -00001.9
> |+++ xpfe/bootstrap/nsNativeAppSupportGtk.cpp 17 Nov 2002 22:06:07 -0000
> --------------------------
> File to patch:
>
> The file, nsNativeAppSupportGtk.cpp exists:
>
> marder-1:/cygdrive/e/mozilla_src/mozilla{14}$ ls -l
> xpfe/bootstrap/nsNativeAppSupportGtk.cpp
> -rwx------ 1 marko None 3624 Nov 17 22:11
> xpfe/bootstrap/nsNativeAppSupportGtk.cpp
> marder-1:/cygdrive/e/mozilla_src/mozilla{15}$
>
> > about a native port and not the patch that's available through Cygwin.
> > If that's a proper assumption, you don't have the right forum to discuss the
> > Windows native version of patch. This list discusses Cygwin-related issues
> > only.
> >
> > Sorry,
> >
> > Larry Hall lhall@rfk.com
Try 'patch -p0 --dry-run < filename'.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: patch(1) (Win32) and path separators
2002-11-19 11:15 ` Igor Pechtchanski
@ 2002-11-19 11:20 ` Parish
2002-11-22 12:59 ` Soren A
0 siblings, 1 reply; 7+ messages in thread
From: Parish @ 2002-11-19 11:20 UTC (permalink / raw)
To: cygwin
On 19/11/2002 18:50 Igor Pechtchanski stood on a soap-box and preached
to the unwashed masses:
> Try 'patch -p0 --dry-run < filename'.
That did it. Thanks Igor :-)
I'd always assumed that without -p patch obeyed the path in the diff and
that -p was only needed if, for example, the path in the diff was
absolute and you needed a relative one. I didn't read all of the -p
section in the manpage because it didn't seem to be what I needed, but
/now/ I've read the last paragraph.
Previously I'd been editing the diffs to replace '/' with '\' so it
worked; I guess what was happening was that patch was interpreting the
whole string a filename but the shell, or the system calls patch uses,
were interpreting the '\' as path separators and therefore it worked?
Thanks again for the help.
Regards,
Parish (who's going to make 'patch' an alias for 'patch -p0' ;-) )
> Igor
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: patch(1) (Win32) and path separators
2002-11-19 11:20 ` Parish
@ 2002-11-22 12:59 ` Soren A
0 siblings, 0 replies; 7+ messages in thread
From: Soren A @ 2002-11-22 12:59 UTC (permalink / raw)
To: cygwin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]
Parish <parish@ntlworld.com> wrote around 19 Nov 2002
news:3DDA8DD9.1080608@ntlworld.com:
>> Try 'patch -p0 --dry-run < filename'.
>
> That did it. Thanks Igor :-)
>
> I'd always assumed that without -p patch obeyed the path in the diff and
> that -p was only needed if, for example, the path in the diff was
> absolute and you needed a relative one. I didn't read all of the -p
> section in the manpage because it didn't seem to be what I needed, but
> /now/ I've read the last paragraph.
I don't always use a tool like patch frequently enough to remember such
subtleties, myself. This was a helpful exchange because I was struggling
with this just yesterday.
{snippo}
> Thanks again for the help.
Yes, thanks!
> Regards,
>
> Parish (who's going to make 'patch' an alias for 'patch -p0' ;-) )
Me too ;-)
Soren A
--
Yes, it's really Sören, not Soren.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: patch(1) (Win32) and path separators
2002-11-19 10:50 ` Larry Hall (RFK Partners, Inc)
@ 2002-11-19 13:31 ` Parish
0 siblings, 0 replies; 7+ messages in thread
From: Parish @ 2002-11-19 13:31 UTC (permalink / raw)
To: cygwin
On 19/11/2002 18:14 Larry Hall (RFK Partners, Inc) stood on a soap-box
and preached to the unwashed masses:
> I have to assume that since you mention the "Windows version"
> that your talking about a native port and not the patch that's
> available through Cygwin.
Duh! I'm more used to posting in Mozilla NGs and got into the habit of
mentioning the platform, since Moz is multi-platform. A bit irrelevant
for cygwin lists, eh?
Regards,
Parish
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: patch(1) (Win32) and path separators
2002-11-19 10:47 Parish
@ 2002-11-19 10:50 ` Larry Hall (RFK Partners, Inc)
2002-11-19 13:31 ` Parish
0 siblings, 1 reply; 7+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2002-11-19 10:50 UTC (permalink / raw)
To: Parish, cygwin
At 01:10 PM 11/19/2002, Parish wrote:
>patch(1) on Win32 seems to insist on '\' rather than '/' in the paths in diffs. This is somewhat at odds with diff(1) which uses '/', even on Windows.
>
>According to the manpage there is no option to change this behaviour.
>
>I have d/l the sources but have yet to build it (am I correct that it needs gcc to build, i.e. won't build with MSVC++?) with the intention of making my own version that works with '/'.
>
>Can anyone confirm that there isn't an undocumented option (cmd line or build) to make it use '/'? If there isn't, why is it that the Windows version works this way, especially when diff(1) DTRT?
What patch are you using? The Cygwin version works fine with '/'. I have
to assume that since you mention the "Windows version" that your talking
about a native port and not the patch that's available through Cygwin.
If that's a proper assumption, you don't have the right forum to discuss the
Windows native version of patch. This list discusses Cygwin-related issues
only.
Sorry,
Larry Hall lhall@rfk.com
RFK Partners, Inc. http://www.rfk.com
838 Washington Street (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
* patch(1) (Win32) and path separators
@ 2002-11-19 10:47 Parish
2002-11-19 10:50 ` Larry Hall (RFK Partners, Inc)
0 siblings, 1 reply; 7+ messages in thread
From: Parish @ 2002-11-19 10:47 UTC (permalink / raw)
To: cygwin
patch(1) on Win32 seems to insist on '\' rather than '/' in the paths in
diffs. This is somewhat at odds with diff(1) which uses '/', even on
Windows.
According to the manpage there is no option to change this behaviour.
I have d/l the sources but have yet to build it (am I correct that it
needs gcc to build, i.e. won't build with MSVC++?) with the intention of
making my own version that works with '/'.
Can anyone confirm that there isn't an undocumented option (cmd line or
build) to make it use '/'? If there isn't, why is it that the Windows
version works this way, especially when diff(1) DTRT?
Thanks.
Regards,
Parish
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-11-22 17:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-19 11:13 patch(1) (Win32) and path separators Parish
2002-11-19 11:15 ` Igor Pechtchanski
2002-11-19 11:20 ` Parish
2002-11-22 12:59 ` Soren A
-- strict thread matches above, loose matches on Subject: below --
2002-11-19 10:47 Parish
2002-11-19 10:50 ` Larry Hall (RFK Partners, Inc)
2002-11-19 13:31 ` Parish
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).