     # else
     # Overwrite local storage and keep changes
     @_getAllData().then (localData) =>
+      $info 'Data before merge ', localData # TODO: Remove in production
       remoteHashes = (remoteData['__hashes'] or []).join(' ')
       localHashes = (localData['__hashes'] or []).join(' ').substr(0, 2 * 64 + 1)
       if remoteHashes.length is 0 or localHashes.length is 0
         # Remote data are not using the new format. Just update the current local storage
+        $info 'Merge scenario 1', remoteHashes, localHashes
         @_setAllData(remoteData)
       else if (remoteHashes.indexOf(localHashes) >= (@HASHES_CHAIN_MAX_SIZE * 3 / 4) * (64 + 1)) or remoteHashes.indexOf(localHashes) is -1
+        $info 'Merge scenario 2', remoteHashes, localHashes
         @_clearChanges()
         @_setAllData(remoteData)
       else if (localData['__hashes'] or []).join(' ').indexOf((remoteData['__hashes'] or []).join(' ').substr(0, 2 * 64 + 1)) != -1
+        $info 'Merge scenario 3', remoteHashes, localHashes
         # We are up to date do nothing
         @_setAllData(remoteData)
       else
         [nextCommitHash, nextCommitData] = @_computeCommit(localData, @_changes)
         if _(remoteData['__hashes']).contains(nextCommitData)
+          $info 'Merge scenario 4', remoteHashes, localHashes, nextCommitHash
           # The hash next commit already exists drop the changes
           @_setAllData(remoteData)
           @_clearChanges()
         else
+          $info 'Merge scenario 5', remoteHashes, localHashes
           @_setAllData(remoteData)
 
   # @return A jQuery promise

  NoRemoteData: 0
  NetworkError: 1
  NoChanges: 2

# A store able to synchronize with a remote crypted store. This store has an extra method in order to order a push or pull
# operations

    this._raw_set items, _.bind(d.resolve,d)
    d.promise

  _areChangesMeaningful: (data, changes) ->
    if data['__hashes']?.length > 0
      checkData = _.clone(data)
      checkData['__hashes'] = _(checkData['__hashes']).without(checkData['__hashes'][0])
      checkData = _(checkData).omit('__hashes') if checkData['__hashes'].length is 0
      [lastCommitHash, __] = @_computeCommit(checkData, changes)
      return lastCommitHash is data['__hashes'][0]
    no

  # Save lastMd5 in settings
  _setLastMd5: (md5) ->
    @_lastMd5 = md5
