From: Daira Hopwood Date: Wed, 19 Aug 2015 13:48:11 +0000 (+0000) Subject: Debug prints to diagnose version mismatch after deletion (backupdb). X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/flags/(%5B%5E?a=commitdiff_plain;h=c243505dabb6a25cabfd20e901d281d3c6f4125b;p=tahoe-lafs%2Ftahoe-lafs.git Debug prints to diagnose version mismatch after deletion (backupdb). --- diff --git a/src/allmydata/backupdb.py b/src/allmydata/backupdb.py index d7811f83..0b351c54 100644 --- a/src/allmydata/backupdb.py +++ b/src/allmydata/backupdb.py @@ -373,19 +373,22 @@ class MagicFolderDB(BackupDB): If no db entry found then I'll return None. """ c = self.cursor - c.execute("SELECT version" + c.execute("SELECT version, fileid" " FROM local_files" " WHERE path=?", (path,)) row = self.cursor.fetchone() + print "row = %r" % (row,) if not row: return None else: return row[0] def did_upload_file(self, filecap, path, version, mtime, ctime, size): + print "_did_upload_file(%r, %r, %r, %r, %r, %r)" % (filecap, path, version, mtime, ctime, size) now = time.time() fileid = self.get_or_allocate_fileid_for_cap(filecap) + print "fileid = %r" % (fileid,) try: self.cursor.execute("INSERT INTO last_upload VALUES (?,?,?)", (fileid, now, now))