daleharvey/pouchdb — pull request #940 by anowak (2013-09-25 09:15:17+00:00)
Title: (#939, #935) Change way of calculating revsDiff

Until now, `revsDiff` was using `rev_info` option to `get` routine as a
source of information for which revisions are present and which are
missing. This led to problems, as purpose of `rev_info` is to list
revision history of current winning revision, so it doesn't include any
information about conflicts or deleted revisions.

CouchDB itself is using internal index information for obtaining state
of revisions for a given document (see
https://github.com/apache/couchdb/blob/master/src/couchdb/couch_db.erl#L193),
so it seems valid to do the same in PouchDB, by traversing the whole
revision tree obtained by using custom (internal) API. HTTP adapter
overrides `revsDiff` to use a POST request, so it works fine.