Re: diff/patch problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ulf
Yes, you were right :)
The problem was that Notepad++ does not always recognize the file format and I
did not thought of using the 'show hidden chars' command either as the format
showed up in the menu as correct although they were wrong. Solution: Changing
format to Windows or Mac and then back to UNIX.
Soon will Axel receive my files for committing ;-)
Thank you from

Kolbjørn


Ulf-D. Ehlert wrote:
> Hi,
>
> Kolbjørn Stuestøl (Mittwoch, 10. Oktober 2007, 21:34):
>> Added my translations
>
> Did you use a Windows editor?
> I'm pretty sure that after editing every line of the file contained a
> trailing "Carriage Return" character (CR aka \r aka ^M).
>
>> Looking at for example the file drop-shadow.xml in the test.patch the
>> only "normal" lines are the two first:
>>
>> --- src/filters/light_effects/drop-shadow.xml     (revision 2107)
>>
>> +++ src/filters/light_effects/drop-shadow.xml   (working copy)
>>
>> The next lines are marked for deletion with a minus sign (-):
>>
>> @@ -1,575 +1,581 @@
>>
>> -<?xml version="1.0" encoding="UTF-8"?>
>>
>> -
>>
>> .
>>
>> -  </sect3>
>>
>> -</sect2>
>>
>>
>>
>> Thereafter all lines, including my adding's, are signed with a plus
>> sign indicating this lines should be added:
>>
>> +<?xml version="1.0" encoding="UTF-8"?>
>>
>> +
>>
>> +<!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
>>
>> +                "http://www.docbook.org/xml/4.3/docbookx.dtd";>
>
> The lines differ due to the invisible CR char.
>
>>> Hmm, trailing "^M"s in your modified files?! Try "cat -v
>>> file-name".
>>
>> No help, just added lots of "^M"s to the file.
>
> Yes!  "cat -v" or "cat --show-nonprinting" should just show you if
> there were trailing CR chars.
>
> Example:
>
> [ulf@linux] cat -v file-without-CR
> foo
> bar
> [ulf@linux] recode lat1..ibmpc file-without-CR
> [ulf@linux] cat -v file-without-CR
> foo^M
> bar^M
> [ulf@linux] recode ibmpc..lat1 file-without-CR
> [ulf@linux] cat -v file-without-CR
> foo
> bar
>
> So you just have to remove these characters. Maybe there's an editor
> option to do this automatically? (BTW, did you change/update your
> editor?)
>
> Otherwise, you can try:
>
> tr -d '\r' < input_file_with_CR > output_file_without_CR
> or
> perl -i -p -e 's/\r$//' file_with_CR
> or
> sed -e 's/\r//' input_file_with_CR > output_file_without_CR
> or
>         recode ibmpc..utf8 file_with_CR
>
> after editing your files. (Check with "cat -v".)
>
> HTH
>
> Bye,
> Ulf
>
> _______________________________________________
> Gimp-docs mailing list
> Gimp-docs@xxxxxxxxxxxxxxxxxxxxxx
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-docs

_______________________________________________
Gimp-docs mailing list
Gimp-docs@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-docs


[Index of Archives]     [Video For Linux]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [Scanners]     [GEGL]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux