Adding a CouchDB backend

Sebastian Spaeth Sebastian at SSpaeth.de
Mon Sep 5 15:17:01 BST 2011


On Sat, 3 Sep 2011 17:09:58 +0200, "=?utf-8?B?IFRow6lvZG9yZSBCaWFkYWxh?=" <theodore at biadala.net> wrote:

Cool, a couple of code comments:
https://github.com/theodoreb/offlineimap/blob/couchdb-lite/offlineimap/folder/CouchDB.py

__init__ looks fine as it is.
parseToCouch():
  I see that you store them with the Message-ID as key. In theory (and
  also in practice) you can have 2 emails with the exact same Message
  ID. In this case, you overwrite your messages.

  msgid = msgid[1:-1] Would be nice to have a comment that you are
  cutting of pointy brackets here.

The rest of the file actually looks quite ok to me. I see a couple of
things we should migrate to the Base folder implementation, like the
definition of getaccountname().


> https://github.com/theodoreb/offlineimap/blob/couchdb-lite/offlineimap/repository/CouchDB.py

Looking good to me. Even better if it works.
 

> The config file looks like this :
> 
> [Repository Couch]
> type = CouchDB
> dbname = offlineimap
> server = http://localhost:5984/
> 
> Works as local and remote repository.

Nice. Seems decent and optional enough to push as experimental. My only
reservation is the reliance on unique Message-IDs for the filenames.

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110905/a4fdf19b/attachment-0001.sig>


More information about the OfflineIMAP-project mailing list