Page 3 of 4
Posted: Sun Jun 17, 2007 2:54 pm
by stm999999999
ok, the problem IS NOT my diff-format!
I copied my patch to a unix-maschine and it works perfect! (without -e btw). But then I made a new, empty diff-file and copy&paste the code from the nopaste - and I got the same error as you!
Posted: Sun Jun 17, 2007 4:35 pm
by stm999999999
OK, I found a pastebin where I can upload my patches without c&p.
serendipity_event_staticpage.php (but based on the version without your manuall changes!)
http://phpfi.com/242521
If you get the error about "ends in middle", please do not c&p from the web-output but use the download-link - I tried it on a unix-maschine and it works!
and here the other patchtes for image-moving in static pages:
functions_images.inc.php
http://phpfi.com/242534
lang_de.inc.php (the plugin lang-files!)
http://phpfi.com/242546
lang_en.inc.php
http://phpfi.com/242528
utf8-lang_de.inc.php
http://phpfi.com/242529
Posted: Wed Jun 20, 2007 1:18 pm
by garvinhicking
Hi!
Still doesn't work:
Code: Select all
[13:19:26] root@mostlyharmless:/home/garvin/cvs/serendipity/recent/include> wget http://phpfi.com/242534?download
--13:19:28-- http://phpfi.com/242534?download
=> `242534?download'
Resolving phpfi.com... 217.13.204.151
Connecting to phpfi.com|217.13.204.151|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2.186 (2.1K) [application/octet-stream]
100%[==========================================================================>] 2.186 --.--K/s
13:19:28 (130.30 MB/s) - `242534?download' saved [2186/2186]
[13:19:28] root@mostlyharmless:/home/garvin/cvs/serendipity/recent/include> patch < 242534\?download
(Stripping trailing CRs from patch.)
can't find file to patch at input line 6
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|File difference report generated by CSDiff by ComponentSoftware on 17.06.2007 16:25
|
|Base file: C:\Dokumente und Einstellungen\Stephan\Desktop\s9y-diff\Alt\functions_images.inc.php
|Compared file: C:\Dokumente und Einstellungen\Stephan\Desktop\s9y-diff\neu\functions_images.inc.php
|
--------------------------
File to patch: functions_images.inc.php
patching file functions_images.inc.php
Hunk #1 FAILED at 1.
1 out of 11 hunks FAILED -- saving rejects to file functions_images.inc.php.rej
[13:19:39] root@mostlyharmless:/home/garvin/cvs/serendipity/recent/include> patch -e < 242534\?download
patch: **** Only garbage was found in the patch input.
Regards,
Garvin
Posted: Wed Jun 20, 2007 7:29 pm
by stm999999999
I did not understand it!!!!
Code: Select all
[smanske@Komma] 122 (~/patch-dir/patch-test): wget "http://svn.berlios.de/viewcvs/*checkout*/serendipity/trunk/include/functions_images.inc.php"
Warning: wildcards not supported in HTTP.
--19:05:41-- http://svn.berlios.de/viewcvs/*checkout*/serendipity/trunk/include/functions_images.inc.php
=> `functiResolving http-proxy.fu-berlin.de... 130.133.8.114
Connecting to http-proxy.fu-berlin.de|130.133.8.114|:80... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
[ <=> ] 123,043 520.17K/s
19:05:42 (519.17 KB/s) - `functions_images.inc.php' saved [123043]
[smanske@Komma] 123 (~/patch-dir/patch-test): wget "http://phpfi.com/242534?download"
--19:05:59-- http://phpfi.com/242534?download
=> `242534?download'
Resolving http-proxy.fu-berlin.de... 130.133.8.114
Connecting to http-proxy.fu-berlin.de|130.133.8.114|:80... connected.
Proxy request sent, awaiting response... 200 OK
Length: 2,186 (2.1K) [application/octet-stream]
100%[========================================================>] 2,186 --.--K/s
19:05:59 (27.43 MB/s) - `242534?download' saved [2186/2186]
[smanske@Komma] 124 (~/patch-dir/patch-test): dir
total 264
drwxr-xr-x 2 45117 1010 59 Jun 20 19:05 ./
drwxr-xr-x 3 45117 1010 4096 Jun 20 19:04 ../
-rw-r--r-- 1 45117 1010 2186 Jun 20 19:05 242534?download
-rw-r--r-- 1 45117 1010 123043 Jun 20 19:05 functions_images.inc.php
[smanske@Komma] 126 (~/patch-dir/patch-test): patch < 242534\?download
(Stripping trailing CRs from patch.)
can't find file to patch at input line 6
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|File difference report generated by CSDiff by ComponentSoftware on 17.06.2007 16:25
|
|Base file: C:\Dokumente und Einstellungen\Stephan\Desktop\s9y-diff\Alt\functions_images.inc.php
|Compared file: C:\Dokumente und Einstellungen\Stephan\Desktop\s9y-diff\neu\functions_images.inc.php
|
--------------------------
File to patch: functions_images.inc.php
patching file functions_images.inc.php
or direct
Code: Select all
[smanske@Komma] 141 (~/patch-dir/patch-test): patch functions_images.inc.php < 242534\?download
(Stripping trailing CRs from patch.)
patching file functions_images.inc.php
and the patch is well done!
this is working on an IRIX 6.5-server.
Posted: Thu Jun 21, 2007 7:59 am
by falk
I think it is the CRNL problem with Windows. Have also a look if you are using ISO-8859-1, CP 1252 or UTF8. It must be ISO-8859-1. Safe the file with NL only and it should work. Or not?
Posted: Thu Jun 21, 2007 1:34 pm
by stm999999999
falk wrote:I think it is the CRNL problem with Windows. Have also a look if you are using ISO-8859-1, CP 1252 or UTF8. It must be ISO-8859-1. Safe the file with NL only and it should work. Or not?
Who should do so?
And how can I see on the unix-maschine which char encoding is used?
Or is there anything I can do on my windows?
and now I tried it on another unix-maschine:
Code: Select all
$ patch functions_images.inc.php < 242534\?download
Hmm... Looks like a normal diff to me...
The text leading up to this was:
--------------------------
|File difference report generated by CSDiff by ComponentSoftware on 17.06.2007 16:25
|
|Base file: C:\Dokumente und Einstellungen\Stephan\Desktop\s9y-diff\Alt\functions_images.inc.php
|Compared file: C:\Dokumente und Einstellungen\Stephan\Desktop\s9y-diff\neu\functions_images.inc.php
|
--------------------------
Patching file functions_images.inc.php using Plan A...
Hunk #1 failed at 1.
Hunk #2 succeeded at 3106.
Hunk #3 failed at 3122.
Hunk #4 failed at 3153.
Hunk #5 failed at 3155.
Hunk #6 failed at 3169.
Hunk #7 succeeded at 3198.
Hunk #8 failed at 3209.
Hunk #9 failed at 3220.
Hunk #10 failed at 3231.
Hunk #11 failed at 3240.
9 out of 11 hunks failed--saving rejects to functions_images.inc.php.rej
Hmm... Ignoring the trailing garbage.
done
[UPDATE] I tried on this machine with some files and patches from the s9y-svn - it works without problems.
Code: Select all
$ diff -v
diff (GNU diffutils) 2.8.1
Copyright (C) 2002 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 Paul Eggert, Mike Haertel, David Hayes,
Richard Stallman, and Len Tower.
the working diff:
Code: Select all
[smanske@Komma] 111 (~/patch-dir/patch-test): diff -v
GNU diff version 1.15
Usage: diff [-bcefhilnrstw -Dstring -Sname -xpattern ] file1 file2
GNU diff options: [-# -aBdHNpqTuv -Cnum -Fregexp -Iregexp -Llabel]
Posted: Thu Jun 21, 2007 1:43 pm
by garvinhicking
Hi!
The failure output you get on that unix machine is like mine, so now you can reproduce it?
Regards,
Garvin
Posted: Thu Jun 21, 2007 2:36 pm
by stm999999999
yes, I can reprocduce it on this very machine - on the first server it works still well.
Now I tried another of my patches (for serendipity_event_staticpage.php on Revision 1.102)
and I got:
Code: Select all
[smanske@Komma] 128 (~/patch-dir/patch-test): patch serendipity_event_staticpage.php\?revision=1.102 < 242521\?download
(Stripping trailing CRs from patch.)
patching file 'serendipity_event_staticpage.php?revision=1.102'
but
Code: Select all
$ patch serendipity_event_staticpage.php < 242521?download
Hmm... Looks like a normal diff to me...
The text leading up to this was:
--------------------------
|File difference report generated by CSDiff by ComponentSoftware on 17.06.2007 15:07
|
|Base file: C:\Dokumente und Einstellungen\Stephan\Desktop\s9y-diff\Alt\serendipity_event_staticpage.php
|Compared file: C:\Dokumente und Einstellungen\Stephan\Desktop\s9y-diff\neu\serendipity_event_staticpage.php
|
--------------------------
Patching file serendipity_event_staticpage.php using Plan A...
Hunk #1 failed at 1.
Hunk #2 succeeded at 2228.
Hunk #3 succeeded at 2230.
Hunk #4 succeeded at 2251.
1 out of 4 hunks failed--saving rejects to serendipity_event_staticpage.php.rej
Hmm... Ignoring the trailing garbage.
done
is this exact the same error as yours?
1) what is curious: patching functions_images.inc.php - why are there two Hunks that are succeeded?
2) I think it would be the best to find out what are the difference between the two unix-systems. 1st it is another diff-version (what is your diff-version?) 2nd perhaps another charset as Falk mentioned?
new: try to open the patch-file (e.g. with pico) and save it without any changes: then it works on the 2nd machine, too!
important: the size of the patchfile must shrunk!
OK, [UPDATE] Use dos2unix on the patch-file after downloading!
Posted: Thu Jun 21, 2007 3:06 pm
by garvinhicking
Hi!
Okay, will try that.
Regards,
Garvin
Posted: Sat Jun 23, 2007 11:18 pm
by stm999999999
any success until now?
Posted: Mon Jun 25, 2007 12:33 pm
by garvinhicking
Hi!
Had no time yet to test it and then check the code. Might take me until the end of the week because this needs to be thoroughly tested before I can commit it.
Regards,
Garvin
Posted: Mon Jun 25, 2007 9:49 pm
by stm999999999
OK, take every needed time to test - but can you give me an intermediate result when you know whether my patches are readable for you with the mentioned ways (dos2unix or read&save with pico).
So I would be able to make the patches to the staticpage-thing about related categories. Thanks!
Posted: Tue Jun 26, 2007 12:47 pm
by garvinhicking
Hi!
Code: Select all
wget "http://phpfi.com/242534?download"
dos2unix 242534\?download
patch functions_images.inc.php < 242534\?download
for me still results in:
Code: Select all
Hunk #1 FAILED at 1.
1 out of 11 hunks FAILED -- saving rejects to file functions_images.inc.php.rej
Best regards,
Garvin
Posted: Tue Jun 26, 2007 1:59 pm
by stm999999999
I do not understand this!
Did you try the pico-trick as well?
Posted: Tue Jun 26, 2007 3:12 pm
by garvinhicking
Hi!
I don't use/know pico
Regards,
Garvin