]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Debug prints to diagnose version mismatch after deletion (backupdb).
authorDaira Hopwood <daira@jacaranda.org>
Wed, 19 Aug 2015 13:48:11 +0000 (13:48 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Thu, 1 Oct 2015 00:19:47 +0000 (01:19 +0100)
src/allmydata/backupdb.py

index d7811f83aae0d68e441f2d7fa1f51bfe01111f15..0b351c5490dfaf79591b51dbc7ace7817fbce612 100644 (file)
@@ -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))