diff options
author | Sascha Silbe <sascha-pgp@silbe.org> | 2010-09-13 08:36:05 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha-pgp@silbe.org> | 2010-09-13 08:36:05 (GMT) |
commit | 164d591df18f1c5b32866b5a69020f6b3cf3b40c (patch) | |
tree | 7e469a984ec3a0c5da527e3b46dfa891b6ea20ec | |
parent | 768935ffff491df9ffce109db7d4d6498e265ae4 (diff) |
fix ordering for data store with version support
When bundling up several versions of the same entry we need to order them based
on their relationship, with the base version (empty parent_id) coming first.
For now we'll just request them in timestamp order from the data store, instead
of performing topological sorting ourselves. In practice this should be good
enough.
-rw-r--r-- | backup.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -396,7 +396,8 @@ class AsyncBackup(gobject.GObject): """Retrieve a list of all entries from the data store.""" if self._data_store.dbus_interface == DS_DBUS_INTERFACE2: return self._data_store.find({}, {'metadata': - ['tree_id', 'version_id'], 'all_versions': True}, + ['parent_id', 'tree_id', 'version_id'], 'all_versions': True, + 'order_by': ['-timestamp']}, timeout=5*60, byte_arrays=True) else: return self._data_store.find({}, ['uid'], byte_arrays=True) |