From 1b35b7303885d6929f0f9dd002820b3be6dbfe1e Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 22 Dec 2006 23:28:05 +0000 Subject: [PATCH] * src/GrampsDb/_WriteXML.py: fix bookmark handling * src/plugins/FindDupes.py (Merge.find_potentials): update internal list on call (bug# 789) copy the LDS information (bug# 642) (MergePeople.merge_existing_family): fix child references on merge svn: r7838 --- gramps2/ChangeLog | 9 ++++++--- gramps2/src/Merge/_MergePerson.py | 10 +++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 34af8a692..4589252af 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,8 +1,11 @@ 2006-12-22 Don Allingham - + * src/GrampsDb/_WriteXML.py: fix bookmark handling + * src/plugins/FindDupes.py (Merge.find_potentials): update internal + list on call (bug# 789) * src/Merge/_MergePerson.py (MergePeople.merge_person_information): - copy the LDS information - + copy the LDS information (bug# 642) + (MergePeople.merge_existing_family): fix child references on merge + 2006-12-21 Don Allingham * src/GrampsDb/_GrampsXMLDB.py: fix bookmarks * TODO: update diff --git a/gramps2/src/Merge/_MergePerson.py b/gramps2/src/Merge/_MergePerson.py index 8c3c62ff4..880dff3f0 100644 --- a/gramps2/src/Merge/_MergePerson.py +++ b/gramps2/src/Merge/_MergePerson.py @@ -357,7 +357,7 @@ class MergePeople: slist = one.get_source_references()[:] for xsrc in two.get_source_references(): for src in slist: - if src.are_equal(xsrc): + if src.is_equal(xsrc): break else: one.add_source_reference(xsrc) @@ -621,6 +621,9 @@ class MergePeople: Merges the relationships associated with the merged people. """ + if __debug__: + print "********Merging Relationships********" + family_num = 0 family_list = self.p1.get_family_handle_list() new.set_family_handle_list(family_list) @@ -640,12 +643,16 @@ class MergePeople: # The target family is already a family in the person's # family list. if tgt_family.get_handle() in self.p1.get_family_handle_list(): + if __debug__: + print "Merging existing family" self.merge_existing_family(new, src_family, tgt_family, trans) continue # This is the case the family is not already in the person's # family list. else: + if __debug__: + print "Merging family pair" self.merge_family_pair(tgt_family,src_family,trans) # change parents of the family to point to the new @@ -780,6 +787,7 @@ class MergePeople: if __debug__: print "Remove parent family %s from %s" \ % (src_family_handle,child_handle) + child.add_parent_family_handle(tgt_family.handle) self.db.commit_person(child,trans) # delete the old source family