summaryrefslogtreecommitdiff
path: root/backends/couch.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-01-09 11:46:58 -0200
committerdrebs <drebs@leap.se>2013-01-09 11:46:58 -0200
commit8e32fdb0be5d34c6554a8c0f75bdf8bf0debcd4a (patch)
treed3b26ee128674b1484db12f7f421facb8724f676 /backends/couch.py
parent11d4d9ece76260639d2c2815b694d6cd68109965 (diff)
CouchDatabase passes u1db LocalDatabaseTests.
Diffstat (limited to 'backends/couch.py')
-rw-r--r--backends/couch.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/backends/couch.py b/backends/couch.py
index 8603a36b..14021737 100644
--- a/backends/couch.py
+++ b/backends/couch.py
@@ -58,6 +58,8 @@ class CouchDatabase(ObjectStore):
generation = self._get_generation()
results = []
for doc_id in self._database:
+ if doc_id == self.U1DB_DATA_DOC_ID:
+ continue
doc = self._get_doc(doc_id)
if doc.content is None and not include_deleted:
continue
@@ -106,13 +108,15 @@ class CouchDatabase(ObjectStore):
content = json.loads(cdoc['u1db_json'])
self._sync_log.log = content['sync_log']
self._transaction_log.log = content['transaction_log']
+ self._conflict_log.log = content['conflict_log']
self._replica_uid = content['replica_uid']
self._couch_rev = cdoc['_rev']
def _set_u1db_data(self):
doc = self._factory(doc_id=self.U1DB_DATA_DOC_ID)
- doc.content = { 'transaction_log' : self._transaction_log.log,
- 'sync_log' : self._sync_log.log,
+ doc.content = { 'sync_log' : self._sync_log.log,
+ 'transaction_log' : self._transaction_log.log,
+ 'conflict_log' : self._conflict_log.log,
'replica_uid' : self._replica_uid,
'_rev' : self._couch_rev}
self._put_doc(doc)