SourceForge.net Logo LinuxFund.org Logo
Home Press Mailing Lists Documentation Screenshots People SourceForge Downloads

Patches HOWTO

Please send patches to SourceForge Patches. SourceForge has a limit on patch size of 256k.

Patches are files created using diff that list only the changes between two sets of files. Using the patch command you can then migrate those differences to another copy of the same source. This is an alternative to using CVS to check-in changes made to a group project.

For discussion here we will assume that we are working on CinePaint version 0.7. We have an original untouched copy in a directory called filmgimp-0.7, and our new copy with changes in a directory named filmgimp-0.7-new. We've made changes that we wish to apply to filmgimp-0.16.

Our first step is to make clean to eliminate as many unnecessary files as we can from filmgimp-0.7-new.

$ cd filmgimp-0.7-new
$ make clean

Next let's see what new files we have added, the "onlies" that are new files.

$ diff -qr filmgimp-0.7 filmgimp-0.7-new |grep "Only in" > fg7.onlies.txt

Some of the files listed will likely be intermediate output that didn't get deleted by make clean and need to be removed by hand. This is particularly the case for Makefiles generated by configure. (To see both onlies and the names of files that differ, leave off piping through grep in the command above.)

During our development we did some housekeeping to move files to different directories. Normally we wouldn't want to do this, because it creates extra work to straighten out when patching. Using our onlies list we create a mv script to rename files that we moved to different directories. We create mv_up.sh and its inverse, mv_down.sh.

$ cd filmgimp-0.7
$ sh ../mv_down.sh

Now we're ready to make our patch:

$ diff -aur --strip-trailing-cr filmgimp-0.7 filmgimp-0.7-new > fg7.patch

Because we're working with *nix files that we modified in Windows we need to strip off the trailing carriage returns inserted by Windows. Our patch is stored as fg7.patch. We're going to apply this to filmgimp-0.16. Because that's changing 0.16 we've named our directory filmgimp-0.16-new.

To appy our patch:

$ cd filmgimp-0.16-new/
$ patch -p1 < ../fg7.patch > ../fg7.txt
$ grep "saving rejects" fg7.txt > fg7.rejects.txt

The results of our merge are in fg7.txt. It lists several problems that must be fixed manually. Note that one of the rejects listed here was due to the file to be patched no longer existing in the new version. For convenience, we've used grep to list the rejected hunks in fg7.rejects.txt.

We need to copy our filmgimp-0.7-new/win32 directory manually to filmgimp-0.16-new. It wasn't included in the patch because it didn't exist before. After applying our patch we need the extra step of using our mv script to rename files we had moved back into the correct locations.

$ cd filmgimp-0.16-new
$ sh ../mv_up.sh

Once these problems are corrected we'll repeat the process to create a patch against the original 0.16.

$ diff -aur --strip-trailing-cr filmgimp-0.16 filmgimp-0.16-new > fg16.patch

This demonstrates how to catch up with the current version so we have a current patch.

More Patches Info

Autotools

Bugs

All non-trivial software has bugs. Accurate bug reports from users help us find and remove defects from CinePaint. Don't just talk about an issue on the mailing list and leave it at that. File a bug report so it gets in our tracking system.

Why can't I see the {Submit New} option in the Bugs tracker?

Because you are not logged in. You can't post a bug report anonymously. If you don't already have one, you need to create a user name on SourceForge. Users must log in to SourceForge before reporting bugs. Otherwise, we couldn't track who to follow-up with if we have questions about a bug report. You don't need to be logged in to see the list of known bugs already posted. Don't forget to check that what you think is a bug isn't already in the "Closed" section of the bug tracker.

When you add a bug report to the tracker your report is automatically cc-ed to the CinePaint-developers mailing list. If you aren't quite sure if something is a bug please discuss it on the list first. To submit a bug report to our Bugs tracker from our home page, pick {SourceForge} {Bugs} {Submit New}.

If you create a fix for a bug please send that to Patches.

If you want to make a feature request that goes to Feature Requests. But first, please discuss your feature idea on the mailing list. It may be that it has already been discussed and resolved in another way. Or, it could be that feedback from others would improve your suggestion.

There are three trackers.

We have an emphasis on quality beyond what many programs concern themselves with because CinePaint is used in commercial motion picture production. Unlike many open source projects, we have no stable/unstable dichotomy of versions. We deliberately focus on just one version at a time. We want to make each release better and more stable than the last. That's not easy with programmers spread all over the world and at various skill levels from student to pro.


Questions to rower@movieeditor.com
Created November 30, 2002; updated June 26, 2003