sproutcore/sproutcore — pull request #938 by mauritslamers (2013-03-04 14:47:48+00:00)
Title: adding a straightforward way to know which conflicts exists between a nested store and its parent

Currently there is no easy way to figure out what the conflicts between a nested store and its parent are. This path adds two methods SC.NestedStore#commitConflictsWithParent and SC.Store#_commitConflictsFromNestedStore which return either an array with store keys in case of a conflict, or false when no conflict has been found.

The code is almost identical to SC.Store#_verifyLockRevisions, except that the code in this requests gathers the store keys instead of throwing an error. To increase code reuse, it might be useful to have _verifyLockRevisions wrap commitConflictsWithParent and throw an error when a conflict has been detected.

Tests included.