My last best guess, based on this:
http://guide.couchdb.org/draft/conflicts.html
... is to find the document id and revision ID, and then send a deletion for that document indicating the version I want to delete.
curl -X DELETE $HOST/databasename/doc-id?rev=2-de0ea16f8621cbac506d23a0fbbde08a
I think this will leave the previous revision. Any better ideas out there?
I had to write some coffeescript (using underscore.js and jquery.couch ) to do this. This is not a real comeback, because we get the old revision and create a new revision. Still looking for the best deals:
_.each docsToRevert, (docToRevert) -> $.couch.db("databaseName").openDoc docToRevert.id, revs_info: true , success: (doc) -> $.couch.db("databaseName").openDoc docToRevert.id, rev: doc._revs_info[1].rev
source share