Owen,

I think I will not need the old revisions after all. This is because what happens with Couch Potato is this:

1) Client 1 reads revision 1 , changes the doc content and saves - revision 2 is created 2) Client 2 reads revision 1 in parallel to client 2, changes the content and tries to save - Couch Potato raises a conflict exception

So now all client 2 has to do is to read revision 2, resolve the conflict between what client 1 wrote (in revision 2) to what it was attempting to write and save ( revision 3 will be created).

Thanks for your help

Oren

On 06/02/2011 05:31 PM, Owen Marshall wrote:
At Sat, 28 May 2011 09:25:07 +0300,
Oren Shani wrote:

I have one question tough (to Oern or to anyone who may know) -
how do I access the older revisions?
For the plain HTTP API:

GET /db/document_id?rev=old_rev_id
You can also GET /db/document_id?open_revs=["r1", "r2", ...] and CouchDB will 
return those full revisions in an array.
See http://wiki.apache.org/couchdb/HTTP_Document_API for more.

Unfortunately I haven't used Couch Potato so I can't help there... surely 
though there is a way to pass in extra parameters, and I'd try throwing in a 
{'rev': 'blah'} there.


Reply via email to