From 68df0add5f1de026b152555ac72aed13e0c50a43 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 17 May 2004 02:59:44 +0000 Subject: [PATCH] update svn: r3175 --- gramps2/ChangeLog | 4 ++++ gramps2/src/RelLib.py | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 9a0e37bc3..49a69e62e 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -3,6 +3,10 @@ * src/plugins/RelGraph.py (_get_event_label): Typo. * src/plugins/ReorderIds.py: Display message and return. +2004-05-15 Don Allingham + * src/plugins/ReadGedcom.py: handle mangled temple format + produced by some tools + 2004-05-15 Alex Roitman * src/plugins/RelGraph.py (_write_graph_record): Bug fixes. * src/docgen/RTFDoc.py: Typo. diff --git a/gramps2/src/RelLib.py b/gramps2/src/RelLib.py index 92513176c..c346c5922 100644 --- a/gramps2/src/RelLib.py +++ b/gramps2/src/RelLib.py @@ -2409,6 +2409,8 @@ class GrampsDB: self.env = db.DBEnv() flags = db.DB_CREATE|db.DB_INIT_MPOOL|db.DB_PRIVATE + + self.undolog = "%s.log" % name self.env.open(os.path.dirname(name), flags) name = os.path.basename(name) @@ -2431,6 +2433,9 @@ class GrampsDB: self.person_map.associate(self.surnames, find_surname, db.DB_CREATE) self.event_map.associate(self.eventnames, find_eventname, db.DB_CREATE) + self.undodb = db.DB() + self.undodb.open(self.undolog, db.DB_RECNO, db.DB_CREATE) + self.bookmarks = self.metadata.get('bookmarks') if self.bookmarks == None: self.bookmarks = [] @@ -2466,7 +2471,13 @@ class GrampsDB: self.surnames.close() self.eventnames.close() self.env.close() + self.undodb.close() + try: + os.remove(self.undolog) + except: + pass + self.person_map = None self.family_map = None self.place_map = None