forked from couchbaselabs/TouchDB-iOS
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed winning-revision rule for conflicts
If there are conflicting revisions the one with the greater revid "wins" and is returned by default.
The problem is that CouchDB has a specific definition of "greater" for revIDs -- basically, the numeric prefix is parsed as a number, not as ASCII. This only makes a difference for revisions with generation numbers greater than 9.
For compatibility, I've added a custom collation for rebids that matches CouchDB. This fixes #10.
- Loading branch information
Showing
1 changed file
with
89 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters