Upgrading / Migrating Templates and Snippets Customizations |
There are two ways you can apply your remaining customization changes to the new GAS version:
A clean customization reduces the migration time and risks of conflict when applying the patch.
This second method is preferred for complex and intrusive customizations that require re-work and/or strong adaptations to be migrated inside new template and snippets set.
$ cd /opt/newer-gas/tpl $ mkdir MyCustomSetAjax/ $ cp SetAjax/Image.xhtml MyCustomSetAjax/Image.xhtml $ cd MyCustomSetAjax/ $ patch -p NUM < /some/where/Image.xhtml.patch patching file Image.xhtml $
--- /opt/gas/tpl/SetAjax/Image.xhtml 2009-04-09 11:18:31.000000000 +0200 +++ /opt/gas/tpl/MyCustomSetAjax/Image.xhtml 2009-11-19 12:00:51.000000000 +0100 ...
$ patch -p 6 < /some/where/Image.xhtml.patch
To apply patch on Windows you need the patch for windows tool.
>set PATH="C:\Program Files\GnuWin32\bin";%PATH% >cd C:\Program Files\newer-gas >mkdir MyCustomSetAjax >copy SetAjax\Image.xhtml MyCustomSetAjax\ 1 file(s) copied. >patch -p NUM < C:\some\where\Image.xhtml.patch patching file Image.xhtml
--- C:/Program Files/gas/tpl/SetAjax/Image.xhtml Fri Jun 26 16:00:20 2009 +++ C:/Program Files/gas/tpl/MyCustomSetAjax/Image.xhtml Thu Nov 19 10:29:48 2009
$ patch -p 6 < C:\some\where\Image.xhtml.patch
$ patch -p 6 < /some/where/Image.xhtml.patch Hunk #1 FAILED at 12. 1 out of 1 hunk FAILED -- saving rejects to file Image.xhtml.rej
A conflict generally means that this change is not simple enough to be applied automatically. The generated file.rej will help you to figure out why that change needs to be adapted. You will have to migrate that change manually.
Based on the changes isolated in the patch file, adapt or re-work the changes and apply them as you would for a classic templates or snippets customization.