cloudant/CDTDatastore — pull request #32 by mikerhodes (2014-06-04 09:05:33+00:00)
Title: Changes behavior of the conflict resolution framework.

Previously, the conflict resolution framework would append the
CDTDocumentRevision object returned by CDTConflictResolver -resovle:conflicts:
to the current winning revision in a document's tree and then
delete all other conflicting revisions.

This update makes the following changes:
* Restricts the CDTConflictResolver -resolve:conflicts: method to
return one of the CDTDocumentRevision objects found in the conflicts
array it was given. This completely forbids any new CDTDocumentRevision to
become the new winning revision (this is temporary).
* The CDTDocumentRevision returned by CDTConflictResolver -resolve:conflicts:
becomes the new winning revision by deleting all other conflicting revisions
in the document tree.

In addition, this solves the problem with attachments not properly migrating
the the new winning revision since we no longer create any new revisions to the
document tree. (Cloudant FogBugz 31053)

CDTDatastore+Conflicts is modified accordingly.
CDTConflictResolver.h documentation is modified.

Tests are modified and created in DatastoreConflictResolvers and DatastoreConflicts.m
In addition, tests for conflict resolution of documents with attachments are added.