Probably worth wrapping these four lines into a method for clarity, as they're repeated often. Suggest:

```objc
- (CDTDocumentRevision*)addDocumentWithId:(NSString*)docId
                                     body:(NSDictionary*)body
                              toDatastore:(CDTDatastore*)datastore
```

Perhaps `-addNonConflictingDocumentWithId:...`.