pouchdb/pouchdb — pull request #2364 by nolanlawson (2014-06-07 06:44:08+00:00)
Title: (#2342) - harmonize update_seq across all 3 adapters

An alternative version of #2361 where we actually try to get all 3 adapters to behave like the HTTP adapter.

In the end I was successful except for the very special case of conflicts. It seems that CouchDB increments the update_seq for non-local documents based on the depth of the revision tree, not the number of revisions. So conflicts at the same level in the tree only implement the count by one. That's where in the test you see me do `should.be.above` instead of `should.equal`.

The adapter that got clobbered the most was leveldb. There's even an implicit migration in there, although if we assume that the update_seq doesn't matter as long as it gets incremented for every non-local revision written, then it shouldn't make a big difference.