* src/GrampsDb/_GrampsBSDDB.py (GrampsBSDDB.close): Try to reset

the log sequence numbers to make grdb file portable.


svn: r7141
This commit is contained in:
Alex Roitman 2006-08-07 02:00:14 +00:00
parent 68790fb349
commit aff639fa78
2 changed files with 12 additions and 0 deletions

View File

@ -1,4 +1,6 @@
2006-08-06 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsBSDDB.py (GrampsBSDDB.close): Try to reset
the log sequence numbers to make grdb file portable.
* data/gramps.schemas.in: Typo.
2006-08-05 Alex Roitman <shura@gramps-project.org>

View File

@ -902,6 +902,16 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
self.source_map.close()
self.media_map.close()
self.event_map.close()
# Attempt to clear log sequence numbers, to make database portable
# This will only work for python2.5 and higher
try:
self.env.lsn_reset(self.full_name)
except AttributeError:
print "Your grdb database is not portable!"
print "It will not work if you move the file to another machine."
print "Export to XML for portability."
self.env.close()
self.close_undodb()