couchbaselabs/CouchCocoa — pull request #34 by robin (2012-08-04 16:49:36+00:00)
Title: document should always choose the highest revision as current revision

Sometime, a document may have a conflict revision with lower revision number but higher sequence number. If db.tracksChanges is set to YES, after the first sync, the document chooses the revision with the higher sequence number as the current revision instead of the higher revision number, which might be wrong.