gwt_apply/ops.py | if self._existing("Place", op) or self._merged_away("Place", op, lambda row: same_place(row, parent_of())): | if self._existing("Place", op): | a rerun of add_place skips a place the list's own merge_place merged away
gwt_apply/ops.py | if self._existing("Source", op) or self._merged_away("Source", op, reuses): | if self._existing("Source", op): | a rerun of add_source skips a source the list's own merge_source merged away
gwt_apply/ops.py | if self._existing("Repository", op) or self._merged_away("Repository", op, same_name): | if self._existing("Repository", op): | a rerun of add_repository skips a repository the list's own merge_repository merged away
gwt_apply/ops.py | if event is None and self._merged_away("Event", op, reuses): | if False: | a rerun of add_event skips an event the list's own merge_event merged away, never reusing the winner
gwt_apply/ops.py | if cit is None and self._merged_away("Citation", op, reuses): | if False: | a rerun of add_citation skips a citation the list's own merge_citation merged away, never reusing the winner
gwt_apply/ops.py | if not self.c.exists("Note", stable_handle(merge["key"] + "#merge")) and op["key"] not in self.landed: | if True: | an add whose merge note exists reads the merge, so a rerun skips it
gwt_apply/ops.py | holder = self._note_holder(cls, {note}) | holder = self._note_holder(cls, {note}) if winner is None else None | a winner whose Gramps ID names another object now is read on the one object that holds the merge note
gwt_apply/ops.py | if winner is not None:  # its Gramps ID names another object now | if False: | a rerun never merges the object that took a gone winner's Gramps ID into the next winner of the chain
gwt_apply/ops.py | present = (cls, ref) not in self._gone and self.c.handle_for_gramps_id(cls, ref) is not None | present = self.c.handle_for_gramps_id(cls, ref) is not None | a merge whose loser's Gramps ID names another object now skips when its note shows it landed
gwt_apply/ops.py | if holder is not None:  # the list's object is gone | if False:  # the list's object is gone | an op that names a Gramps ID the list merged away, now another object's, stops instead of touching it
gwt_apply/ops.py | if not self.verify: | if False: | only --verify reads a merged-away Gramps ID that names another object now on the note's holder; --apply stops
gwt_apply/ops.py | if not self.c.exists("Note", stable_handle(merge["key"] + "#merge")) and op["key"] not in self.landed: | if False: | on a first run an add never reads its merge's winner, so a list sends no more requests than before
gwt_apply/ops.py | and op["key"] not in self.landed: | : | an add an earlier --apply logged as done reads its winner even when the merge note was deleted, as before the note check
gwt_apply/ops.py | self._read_merges_won_by(cls, ref) | pass | an op ahead of every merge of the list that names a reused winner ID stops instead of changing the new object
gwt_apply/ops.py | if _GRAMPS_ID.match(op["winner"]): | if False: | the first op that names a merge winner by its Gramps ID reads that merge, wherever it sits in the list
gwt_apply/ops.py | if self.c.exists("Note", stable_handle(merge["key"] + "#merge")): | if True: | a first run never reads a merge winner for a merge note that does not exist
gwt_apply/ops.py | self._winners[(cls, ref)] = merges | pass | a try whose read of the merges failed leaves them for the next try to read
gwt_apply/ops.py | self._winners[(cls, merge["winner"])] = [m for m in others if m is not merge] | pass | a rerun of a merge reads its winner once, not once more for the first op that names it
gwt_apply/ops.py | if self._loser_left(cls, merge, reuses):  # the run stopped | if False:  # the run stopped | a rerun finishes the merge of a reused object when the run stopped between the merge note and the merge
gwt_apply/ops.py | return handle is not None and reuses(self.c.get(cls, handle) or {}) | return m is not None | a merge note whose loser is gone still lets the add skip
gwt_apply/ops.py | if reuses is None or merge["key"] in self.landed: | if reuses is None: | a merge an earlier --apply logged as done skips its add even when the loser's Gramps ID names another object now
gwt_apply/ops.py | return handle is not None and reuses(self.c.get(cls, handle) or {}) | return handle is not None | a rerun never reads an unrelated object that got the loser's freed Gramps ID as the loser a stopped merge left
gwt_apply/ops.py | if reuses is None or merge["key"] in self.landed: | if merge["key"] in self.landed: | add_person never reuses an object, so a rerun never reads another person with its loser's Gramps ID as its loser
gwt_apply/ops.py | if family is None and self._merged_away("Family", op, same_parents): | if family is None and self._merged_away("Family", op): | a rerun finishes the merge of a family add_family reused when the run stopped between the merge note and the merge
gwt_apply/ops.py | if event is None and self._merged_away("Event", op, reuses): | if event is None and self._merged_away("Event", op): | a rerun finishes the merge of an event add_event reused when the run stopped between the merge note and the merge
gwt_apply/ops.py | self._merged_away("Place", op, lambda row: same_place(row, parent_of())) | self._merged_away("Place", op) | a rerun finishes the merge of a place add_place reused when the run stopped between the merge note and the merge
gwt_apply/ops.py | self._merged_away("Source", op, reuses) | self._merged_away("Source", op) | a rerun finishes the merge of a source add_source reused when the run stopped between the merge note and the merge
gwt_apply/ops.py | self._merged_away("Repository", op, same_name) | self._merged_away("Repository", op) | a rerun finishes the merge of a repository add_repository reused when the run stopped between the merge note and the merge
gwt_apply/ops.py | if cit is None and self._merged_away("Citation", op, reuses): | if cit is None and self._merged_away("Citation", op): | a rerun finishes the merge of a citation add_citation reused when the run stopped between the merge note and the merge
gwt_apply/ops.py | if winner["handle"] == loser["handle"]:  # an add_event of the list | if False:  # an add_event of the list | merge_event stops when its key: loser names the winner, instead of deleting the winner
gwt_apply/ops.py | if winner["handle"] == loser["handle"]:  # an add_family of the list | if False:  # an add_family of the list | merge_family stops when its key: loser names the winner, instead of deleting the winner
gwt_apply/ops.py | if winner["handle"] == loser["handle"]:  # a key: of an earlier list | if False:  # a key: of an earlier list | merge_person stops when its key: loser names the winner, instead of deleting the winner
gwt_apply/ops.py | return linked and str(ev.get("type")).lower() == etype.lower() | return str(ev.get("type")).lower() == etype.lower() | an event that got a freed loser ID but is not on the add's person or family is never read as the loser of a stopped merge
gwt_apply/ops.py | return row.get("source_handle") == source and (row.get("page") or "").strip() == page | return (row.get("page") or "").strip() == page | a citation of another source that got a freed loser ID is never read as the loser of a stopped merge, nor reused
gwt_apply/ops.py | return same_title(row) and all(r[1] for r in checks(row)) | return same_title(row) | a source that got a freed loser ID with the add's title but another author is not read as the loser, so the rerun skips instead of stopping
gwt_apply/ops.py | return same_page(row) and all(r[1] for r in checks(row)) | return same_page(row) | a citation that got a freed loser ID with the add's page but another confidence is not read as the loser, so the rerun skips instead of stopping
gwt_apply/ops.py | if op.get("description") and (ev.get("description") or "").strip() != op["description"].strip(): | if False: | an event that got a freed loser ID with the add's type and date but another description is not read as the loser
gwt_apply/ops.py | return same_date(ev) and (not op.get("place") or ev.get("place") == self.resolve("Place", op["place"])) | return same_date(ev) | an event that got a freed loser ID with the add's type and date but another place is not read as the loser
