Step 1: Retrieve customization changes

First you need to view all changes you made on templates and snippets. You need to have both versions of each customized template and snippet, the original version and the customized one. You now need to use a diff tool that extracts all differences between both set of templates and snippets.

On UNIX™

The classic diff tool on UNIX is the command line 'diff'.
$ diff -u /some/where/original-snippet.xhtml
 /some/where/else/customized-snippet.xhtml > snippet.patch
For example:
$ diff -u /opt/gas/tpl/SetAjax/Image.xhtml
 /opt/gas/tpl/MyCustomSetAjax/Image.xhtml > Image.xhtml.patch
The Image.xhtml.patch file will contain a readable view of all changes resulting from your customizations. Repeat the command for all you modified templates and snippets.

On Windows™

The recommended diff tool on Windows is the Open Source WinMerge tool.

Once WinMerge is installed, do the following:

  1. Right click on original template or snippet and select "WinMerge" in context menu

    WinMerge screenshot

    Figure 1. Select WinMerge

  2. In "Select Files or Folder'" dialog, click the "Browse..." button on the "Right:" line, select the customized template or snippet file, then click on the "Open" button.

    WinMerge screenshot

    Figure 2. Select Files or Folders dialog

  3. In "Select Files or Folder'" dialog, click the "OK" button. You see a display of changes between the two files.

    WinMerge screenshot

    Figure 3. Display of differences between files

  4. Generate the patch: Choose "Tools > Generate Patch...", choose a patch filename like snippet.xhtml.patch, choose "Unified" in "Format > Style" combobox, and then click the "Ok" button.

    WinMerge screenshot

    Figure 4. Patch Generator dialog

Repeat theses steps for all you modified templates and/or snippets.