RSS/Atom feed Twitter
Site is read-only, email is disabled

patch problems

This discussion is connected to the gimp-docs-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

5 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

patch problems kol-stue at online.no (Kolbj 20 Jan 16:06
  patch problems Axel Wernicke 20 Jan 16:38
patch problems kol-stue at online.no (Kolbj 24 Jan 21:52
  patch problems Axel Wernicke 24 Jan 22:01
patch problems kol-stue at online.no (Kolbj 25 Jan 13:28
kol-stue at online.no (Kolbj
2007-01-20 16:06:41 UTC (about 17 years ago)

patch problems

Hi folks

At last I've made my first, wonderful svn diff files. I was in heaven until Julien (thanks!) made me aware of some errors in my patch file. Command: "patch --dry-run -p0 < gimp.patch > patch.txt" generated this error message :
patching file src/gimp.xml
Hunk #1 FAILED at 32.
1 out of 5 hunks FAILED -- saving rejects to file src/gimp.xml.rej

1. Is the number in "Hunk #1 FAILED at 32" a line number? In case in what file? 2. The promised file src/gimp.xml.rej is not saved anyplace. Is it possible to output this file somewhere?
3. Is there a method to capture those hunks for studying them? I'm not able to figure out what causes the error, but think studying those hunks (text blocks?) would help.

I'm using Cygwin and Notepad++ set to UNIX format in Windows XP. Tried both ANSI and UTF-8.
Found no differences in formatting between the accepted files and the rejected ones. Could I have forgotten something essential?

Hoping someone is able to help me. This is my last barrier, I hope, on my way to do the entire job myself :)

Kolbj?rn Stuest?l

Axel Wernicke
2007-01-20 16:38:43 UTC (about 17 years ago)

patch problems

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Hi Kolbj?rn,

Am 20.01.2007 um 16:06 schrieb Kolbj?rn Stuest?l:

Hi folks

At last I've made my first, wonderful svn diff files. I was in heaven until
Julien (thanks!) made me aware of some errors in my patch file. Command: "patch --dry-run -p0 < gimp.patch > patch.txt" generated this error
message :
patching file src/gimp.xml
Hunk #1 FAILED at 32.
1 out of 5 hunks FAILED -- saving rejects to file src/ gimp.xml.rej

1. Is the number in "Hunk #1 FAILED at 32" a line number? In case in what file?

No it's not. I can only guess: The changes in the patch file are sorted out in hunks - meaning the change, together with some lines that help the patch command to find the actual line to change when the patch is applied later are called a hunk.

So, no chance to use the hunk number to get an idea. of where the patch failed.

2. The promised file src/gimp.xml.rej is not saved anyplace. Is it possible to
output this file somewhere?

This is probably due to the --dry-run option. Otherwise the .rej file contains the lines of the patch that could not applied automatically. In most cases you will be able to apply them by hand - at least that is what I do when a patch fails in only for a couple (c)hunks.

3. Is there a method to capture those hunks for studying them? I'm not able to figure out what causes the error, but think studying those hunks
(text blocks?) would help.

??

I'm using Cygwin and Notepad++ set to UNIX format in Windows XP. Tried both ANSI and UTF-8.
Found no differences in formatting between the accepted files and the rejected
ones. Could I have forgotten something essential?

All our files should be UTF-8 encoded.

Hoping someone is able to help me. This is my last barrier, I hope, on my way to
do the entire job myself :)

hth lexA

Kolbj?rn Stuest?l

kol-stue at online.no (Kolbj
2007-01-24 21:52:46 UTC (about 17 years ago)

patch problems

Hi Axel

----- Original Message ---

Axel Wernicke
2007-01-24 22:01:45 UTC (about 17 years ago)

patch problems

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Hi Kolbj?rn,

Am 24.01.2007 um 21:52 schrieb Kolbj?rn Stuest?l:

...

...

This is probably due to the --dry-run option. Otherwise the .rej file contains the lines of the patch that could not applied automatically.

Yes, you are right. The manual however states that --dry-run "Print the results of applying the patches without actually changing any files". It would be of some help if the reject file where printed out somewhere when using --dry-run? Is there another command to force the printing?

not that I would know one, but applying a patch isn't that bad. If you try to apply an applied patch, the patch command detects that and asks you whether or not you'd like to REMOVE the applied patch! So there is a chance to apply a patch, look what's going on and if necessary you can remove it later.

In most cases you will be able to apply them by hand - at least that is what I do when a patch fails in only for a couple (c)hunks.

Good idea, but where (in what file) do I write the corrections?

Soo, if a patch fails (partially) for lets say my-tool.xml there will be a my-tool.xml.orig containing the content of the file before applying the patch and a my-tool.xml.rej file containing only that lines of the patch that failed. So you just have to do the changes listet in the .rej file to the .xml file by hand.

All our files should be UTF-8 encoded.

As a rule they of cource are.

I have not found a solution or an explanation on the patch problem, but am
working on it.

I got another patch from julien today, just a minute ago it was applied. There where only a few minor issues - all related to the revision date for the no entry. No clue why they failed. Seems specially the revision section is a bit fragile for patching. May be due to the fact that the different sections for each language are _very_ similar?!

Kolbj?rn

Greetings, lexA

- ---
Live is like a chocolate box, you never know what you wanna get... GPG Signatur auf http://wernicke-online.net/Impressum/ pr?fen

-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFt8k6R9mXLVsAbiQRAlzjAKDl+eXNm3XOaPdewHnxXgCXcCdqRwCgtB+j 6m0//YZymyyqgNq7au/nDFY=
=uyhp
-----END PGP SIGNATURE-----

kol-stue at online.no (Kolbj
2007-01-25 13:28:46 UTC (about 17 years ago)

patch problems

Thank you a lot
from
Kolbj?rn

----- Original Message ---