Patches really have nothing to do with Changelogs. The message you point to with the patch snippets actually looks screwed up on the first half, like someone manually changed some things and screwed it up. The second half looks ok.
diff/patch really are pretty easy to understand. To create patch files I usually like to use this command:
- Code: Select all
$ diff -Naur oldfile newfile > my.patch
Take any file, say "file1.txt". Make an exact copy of it say "file2.txt". Now make a couple of changes to a couple of lines in file2.txt and do this:
- Code: Select all
$ diff -Naur file1.txt file2.txt > my.patch
Examine "my.patch". You will notice the first two lines start with "---" which is the original file and "+++" is the file that has been changed along with the date/time stamps. The numbers between the "@@" are the starting line number and number of lines that the snippet comes from. The lines that start with "-" are deletions and the lines that start with "+" are additions. Changed lines will show up as a deleted line and an added line. Using the "patch" command on "file1.txt" using your "my.patch" file you would end up with "file2.txt".
That's really about it. You can run the "diff -Naur" on entire directories and create a single patch file. You will see multiple "---" and "+++" lines for the file names in this case.