Without looking at the code, as I understand it:

GrampsBSDDB is for opening grdb files of 2.2, so it must be able to upgrade grdb files to the latest version. Then the content is copied to a family tree.

dbdir is the code for the new family trees, starting with GRAMPS 3.0. Data from 2.2 and before should be imported into it, so it should in essence not need one upgrade statement yet..

So, the cleanest thing would be that grdb is upgraded to latest grdb version, then copied to first version of dbdir version. When later 3.0 does upgrades to the family trees in dbdir, it should start from there.
Not sure if that is feasible though, and the code probably still resembles the code of the beginning of 3.0 hacking, that is, just a continuation of grdb to family trees.

We should also look at the dump tool, as the wiki page says to make a grdb, whereas for 3.0 we should be carefull with that, or we will need to keep adding upgrade statements to the BSDDB module (which would not be a clean implementation).

So, yes, the code should be cleaned up, but need not be identical for above reasons.

Benny

2008/1/10, Raphael Ackermann < raphael.ackermann@gmail.com>:
gramps_upgrade() in dbdir.py doesn't seem to be doing anything useful
anymore as the only upgrade_13() is commented out. It also has an
unused variable

child_rel_notrans = [
            "None",      "Birth",  "Adopted", "Stepchild",
            "Sponsored", "Foster", "Unknown", "Other", ]

same as the gramps_upgrade() in _GrampsBSDDB.py that has many more
upgrade calls depending on the version of the db. Are both
gramps_upgrade() methods still used or does the one in dbdir.py needs
cleanup?

Raphael

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Gramps-devel mailing list
Gramps-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-devel