HomeEvergreen: Basic System Admin FunctionsApplying patchesfrom SVN

7.2. from SVN

- obtain the SVN diff (either from a SVN command or the Trac 'Unified Diff')

- `cd` to a directory containing the file(s) to be patched

- apply the patch: `patch -Np# -i /home/esi/file.diff` (# = number of '/' to skip in the 'Index' line)


Ex: If I download a patch that has an index of:
"Index: branches/rel_1_6_0/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js"
I might cd into /openils/var/web/xul/server/, then run `patch -Np7 -i patch.diff` (skip '7' slashes, meaning apply the change to ./OpenILS/global_util.js).

When applying a patch to a customer system, we need to easily track
1) that the patch was applied; and
2) when it was applied.
We do this by inserting a value inside the database table

For example, if I applied the changeset at
http://svn.open-ils.org/trac/ILS/changeset/13972/branches/rel_1_4_0, I
would make an entry into config.upgrade_log to indicate such...
insert into config.upgrade_log values ('SVN-13972',now());
This indicates that version "SVN-13972" has been applied, timestamped now.

This page was: Helpful | Not Helpful