daleharvey/pouchdb — pull request #584 by neojski (2013-03-22 19:44:06+00:00)
Title: (#576) - cleanup get

I've done quite a lot work in get and each major point is a commit:

Now logic concerning: open_revs, revs, revs_info, conflicts is in pouch.adapter.js.

1. Tests related to get are moved to test.get.js.
2. Our revs was inconsistent with couch. (it returned too much history if we asked about doc which was not leaf)
3. Open_revs got better tests.
4. Revs_info displayed too much informations. It should display only winning rev branch.
(and here question: we can't do revs_info + rev in couchdb. Why is that?!)
5. Revs_info got correct status information (available/missing (compacted))
6. CollectConflicts was broken. (how was it supposed to work? Or I was wrong about it)
7. Cleanups. (jshint mainly)

The only option that got not touched is attachment. I still don't know them right but I hope to learn how to use them and do something similar with all_docs. (especially as they lack attachment support)