merge_objects
Merge duplicate Gramps objects by re-pointing all references from one record to another and combining their lists in one reversible transaction. Dry-run to confirm they represent the same thing.
Instructions
Merge two objects that are the same thing. Dry-run by default.
This uses Gramps' own server-side merge: every reference to drop is
re-pointed at keep and the subordinate lists are unioned, in one
transaction. Do NOT do this by hand: a manual merge that misses one of the
lists the dropped object carries loses what was on it.
Before merging, be sure they really are one thing. Two records OF the same event are two documents: an index entry and the register page it indexes stay separate, and merging them would turn two independent citations into one, silently weakening every fact that rested on both. Conversely, the same census page entered once per household member IS one document, and leaving the duplicates makes single-sourced facts look corroborated.
Reversible: the merge is one transaction, so list_transactions + undo_transaction can back it out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| drop | Yes | Handle or gramps_id of the object absorbed into it. | |
| keep | Yes | Handle or gramps_id of the object that SURVIVES. | |
| dry_run | No | True (default) reports what would move without changing anything. Set False to apply. | |
| enclosures | No | Places only: the survivor otherwise gets both places' parents. 'auto' drops an undated parent that encloses another (a state beside its county) and refuses if two unrelated undated parents remain; or 'keep_keeper', 'keep_drop', 'keep_both'. Dated enclosures are always kept. | auto |
| object_type | Yes | person, family, event, place, source, citation, repository, media, or note. |