backupdb.did_create_directory: use REPLACE INTO, not INSERT INTO + ignore error
authorBrian Warner <warner@lothar.com>
Wed, 28 Apr 2010 05:08:03 +0000 (22:08 -0700)
committerBrian Warner <warner@lothar.com>
Wed, 28 Apr 2010 05:08:03 +0000 (22:08 -0700)
commite2031aff0f2c031048da2e732d7dce89a4c9d51d
treef0f51696c2577f346649d8c8cbafc2e8cbe129ae
parentf6f8256b3551939234d7617bc9e7b5ca6593e1bd
backupdb.did_create_directory: use REPLACE INTO, not INSERT INTO + ignore error

This handles the case where we upload a new tahoe directory for a
previously-processed local directory, possibly creating a new dircap (if the
metadata had changed). Now we replace the old dirhash->dircap record. The
previous behavior left the old record in place (with the old dircap and
timestamps), so we'd never stop creating new directories and never converge
on a null backup.
src/allmydata/scripts/backupdb.py