Using patches

Since many people have already started working on the project, further updates to the starter code will be distributed in the form of patchesets. You can use these to update your existing code in place so that you can continue working with the patched version without having to merge the changes yourself.

These patches are very easy to apply, just follow these steps:

  1. Backup your files! I can't stress this enough. I can't take responsibility if the machine crashes with the patch half-applied, or some other catastrophe. In general you should be doing this whenver you get something working anyway (preferrably using something like CVS.
  2. Change to the ray/ directory.
  3. Run the command
    patch -p1 < /afs/cs/academic/class/15864-s04/patch-photonMappingStarter-p1
    (or whatever the relevant patch is). You should see something like the following:
  4. patching file Makefile
    patching file src/RayTracer.cpp
    patching file src/RayTracer.h
    patching file src/scene/ray.h
    patching file src/scene/scene.cpp
    patching file src/scene/scene.h
    patching file src/ui/CommandLineUI.cpp
    patching file src/ui/GraphicalUI.cpp
    patching file src/ui/GraphicalUI.h
    patching file src/ui/TraceUI.h
    patching file src/ui/debuggingView.cpp
    patching file src/ui/debuggingView.h
    patching file src/ui/debuggingWindow.cpp
    patching file src/ui/debuggingWindow.fl
    patching file src/ui/debuggingWindow.h
    patching file src/ui/glObjects.cpp

And now you're finished! If you get strange errors like "rejecting hunk n/n", you can look at the .reject files that patch creates and see if you can figure out why. You can drop me an email if you have further questions.


Questions? Contact Christopher Twigg.