From adf903b541e0bc31a3aec6199930451476400e3d Mon Sep 17 00:00:00 2001 Message-Id: From: =?UTF-8?q?Andr=C3=A9s=20Ambrois?= Date: Sun, 4 Jul 2010 03:41:21 -0300 Subject: [PATCH v2 0/7] Add ctime and filesize properties to the datastore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This new version addresses two problems with the last patchset: Bert Freudenberg kindly reminded me that the 'ctime' property had a documented string format [0], which Etoys was using. This version uses that format so we don't break any activities expecting it. Bernie Innocenti produced a datastore that was unable to successfuly upgrade (reindex) to the new version. The problem was that indexing a document failed miserably when ctime or filesize didn't exist, this version avoids that. This version also contains a new patch that checks for and adds the new metadata when rebuilding the index so that old entries can be sorted. [0] http://wiki.sugarlabs.org/go/Development_Team/Low-level_Activity_API#Meta_Data v0: Initial submission to sugar-devel v1: Split ctime and filesize patches as requested by Sascha v2: Change ctime format to '%Y-%m-%dT%H:%M:%S'. Add ctime and filesize metadata when reindexing. Andrés Ambrois (7): Add filesize property to the index. Add migration code from DS v0 for the filesize property Check filesize property on index rebuild. Add ctime property to the index and datastore Check ctime on index rebuild Implement migration from DS v0 for ctime property. Increment CURRENT_LAYOUT_VERSION to trigger an index rebuild src/carquinyol/datastore.py | 28 ++++++++++++++++++++++++++++ src/carquinyol/indexstore.py | 22 ++++++++++++++++++++++ src/carquinyol/layoutmanager.py | 2 +- src/carquinyol/migration.py | 12 +++++++++++- 4 files changed, 62 insertions(+), 2 deletions(-)