NAME
PICA::Patch - Implementation of PICA diff and patch
DESCRIPTION
This file contains the implementation of diff and patch algorithm for PICA+ records. See functions pica_diff and pica_patch (or object methods diff and patch) of PICA::Data for usage.
Both diff and patch use annotated PICA records to express differences between PICA records or changes to be applied to a PICA record (which is basically the same). Fields can be annotated with:
- +
-
To denote a field that should be added.
- -
-
To denote a field that should be removed.
- blank
-
To denote a field that should be kept as it is.
Modification of a field is expressed by removal of the old version followed by addition of the new version.
Records are always sorted before application of diff or patch.
Modification of records that span multiple levels or records that subsume multiple sub-records is not recommended.