On Thu, 22 Jan 2004, Stas Bekman wrote:
Steve Hay wrote:
The attached patch fixes these errors on Win32:
Thanks Steve. I've committed all 3 patches for:
t/response/TestVhost/config.pm t/response/TestCompat/apache.pm t/response/TestAPI/server_util.pm
As I mentioned before I can't apply your patches as is, because the path is in windows-style.
--- t\response\TestAPI\server_util.pm.orig ... +++ t\response\TestAPI\server_util.pm ...
I think if you work with cvs, instead of copying the original file and running diff against it:
cvs diff t\response\TestAPI\server_util.pm
it'll give you the unix path in the diff.
I can't find an option to accept windows style path in the patch(1) manpage :(
That's a good suggestion to use cvs on Windows to generate the diffs, but unfortunately, at least for me, cvs diff -u t\response\TestAPI\server_util.pm will give Windows-style paths in the diff file. However, cvs diff -u t/response/TestAPI/server_util.pm will work.
I guess it does the right thing for windows users.
what happens if you don't give the path, but just run 'cvs diff'? I suppose it'll give you the windows path then.
I suppose that it's unusual for windows users to send any diff format patches, since otherwise I'm sure patch(1) on unix would have had an option to handle windows paths. and/or diff on windows produce unix passes via an option.
I suppose this one liner could do the trick:
perl -pi -e '/^(Index:|RCS file:|--- |\+\+\+ )/ && s|\\|/|g' patch.txt
or as a pipe:
cvs diff | perl -pe '/^(Index:|RCS file:|--- |\+\+\+ )/ && s|\\|/|g' > patch.txt
Hopefully my pattern won't mess any other things ;)
of course this regex makes unix patches to use windows path:
perl -pi -e '/^(Index:|RCS file:|--- |\+\+\+ )/ && s|/|\\|g' patch.txt
;) __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
