{"action":"created","comment":{"url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls/comments/29912219","id":29912219,"diff_hunk":"@@ -1173,11 +1182,35 @@ bool GoogleTwoWayContactSyncAdaptor::storeExtraStateData(int accountId)\n     values.insert(\"contactEtags\", ceValue);\n     values.insert(\"contactIds\", ciValue);\n     values.insert(\"contactAvatars\", caValue);\n-    if (!d->m_engine->storeOOB(d->m_stateData[QString::number(accountId)].m_oobScope, values)) {\n+    if (!d->m_engine->storeOOB(d->m_stateData[accountIdStr].m_oobScope, values)) {\n         SOCIALD_LOG_ERROR(\"failed to store extra state data for\" << d->m_syncTarget << \"account\" << accountId);\n-        d->clear(QString::number(accountId));\n+        d->clear(accountIdStr);\n         return false;\n     }\n \n-    return true;\n+    // call superclass implementation.\n+    return TwoWayContactSyncAdapter::storeSyncStateData(accountIdStr);\n+}\n+\n+bool GoogleTwoWayContactSyncAdaptor::purgeSyncStateData(const QString &accountIdStr, bool purgePartialSyncStateData)\n+{\n+    // first, remove our extra state data\n+    bool removed = true;\n+    QStringList purgeKeys;\n+    purgeKeys << QStringLiteral(\"myContactsGroupAtomId\") << QStringLiteral(\"unsupportedElements\");\n+    purgeKeys << QStringLiteral(\"addressbookSyncTokens\") << QStringLiteral(\"contactUids\");","path":"src/google/google-contacts/googletwowaycontactsyncadaptor.cpp","position":138,"original_position":138,"commit_id":"6b881046d06a16853cd6cc939b87f6651575a7c8","original_commit_id":"6b881046d06a16853cd6cc939b87f6651575a7c8","user":{"login":"matthewvogt","id":2569784,"avatar_url":"https://avatars.githubusercontent.com/u/2569784?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewvogt","html_url":"https://github.com/matthewvogt","followers_url":"https://api.github.com/users/matthewvogt/followers","following_url":"https://api.github.com/users/matthewvogt/following{/other_user}","gists_url":"https://api.github.com/users/matthewvogt/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewvogt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewvogt/subscriptions","organizations_url":"https://api.github.com/users/matthewvogt/orgs","repos_url":"https://api.github.com/users/matthewvogt/repos","events_url":"https://api.github.com/users/matthewvogt/events{/privacy}","received_events_url":"https://api.github.com/users/matthewvogt/received_events","type":"User","site_admin":false},"body":"Remove","created_at":"2015-05-08T01:50:37Z","updated_at":"2015-05-08T01:50:37Z","html_url":"https://github.com/nemomobile/buteo-sync-plugins-social/pull/27#discussion_r29912219","pull_request_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls/comments/29912219"},"html":{"href":"https://github.com/nemomobile/buteo-sync-plugins-social/pull/27#discussion_r29912219"},"pull_request":{"href":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls/27","id":34880481,"html_url":"https://github.com/nemomobile/buteo-sync-plugins-social/pull/27","diff_url":"https://github.com/nemomobile/buteo-sync-plugins-social/pull/27.diff","patch_url":"https://github.com/nemomobile/buteo-sync-plugins-social/pull/27.patch","issue_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/27","number":27,"state":"open","locked":false,"title":"[buteo-sync-plugins-social] Improve error handling in Google Contacts sync. Contributes to MER#973","user":{"login":"chriadam","id":2569776,"avatar_url":"https://avatars.githubusercontent.com/u/2569776?v=3","gravatar_id":"","url":"https://api.github.com/users/chriadam","html_url":"https://github.com/chriadam","followers_url":"https://api.github.com/users/chriadam/followers","following_url":"https://api.github.com/users/chriadam/following{/other_user}","gists_url":"https://api.github.com/users/chriadam/gists{/gist_id}","starred_url":"https://api.github.com/users/chriadam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriadam/subscriptions","organizations_url":"https://api.github.com/users/chriadam/orgs","repos_url":"https://api.github.com/users/chriadam/repos","events_url":"https://api.github.com/users/chriadam/events{/privacy}","received_events_url":"https://api.github.com/users/chriadam/received_events","type":"User","site_admin":false},"body":"Previously, we didn't remove all out-of-band sync state data when an\r\nerror occurred during sync.  This commit ensures that we do so.\r\n\r\nContributes to MER#973","created_at":"2015-05-07T03:27:38Z","updated_at":"2015-05-08T01:50:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"354fe2cd69131117ca7122c06dd0452ca928ed96","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls/27/commits","review_comments_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls/27/comments","review_comment_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/27/comments","statuses_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/statuses/6b881046d06a16853cd6cc939b87f6651575a7c8","head":{"label":"nemomobile:removeextraoob","ref":"removeextraoob","sha":"6b881046d06a16853cd6cc939b87f6651575a7c8","user":{"login":"nemomobile","id":1088947,"avatar_url":"https://avatars.githubusercontent.com/u/1088947?v=3","gravatar_id":"","url":"https://api.github.com/users/nemomobile","html_url":"https://github.com/nemomobile","followers_url":"https://api.github.com/users/nemomobile/followers","following_url":"https://api.github.com/users/nemomobile/following{/other_user}","gists_url":"https://api.github.com/users/nemomobile/gists{/gist_id}","starred_url":"https://api.github.com/users/nemomobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nemomobile/subscriptions","organizations_url":"https://api.github.com/users/nemomobile/orgs","repos_url":"https://api.github.com/users/nemomobile/repos","events_url":"https://api.github.com/users/nemomobile/events{/privacy}","received_events_url":"https://api.github.com/users/nemomobile/received_events","type":"Organization","site_admin":false},"repo":{"id":20760271,"name":"buteo-sync-plugins-social","full_name":"nemomobile/buteo-sync-plugins-social","owner":{"login":"nemomobile","id":1088947,"avatar_url":"https://avatars.githubusercontent.com/u/1088947?v=3","gravatar_id":"","url":"https://api.github.com/users/nemomobile","html_url":"https://github.com/nemomobile","followers_url":"https://api.github.com/users/nemomobile/followers","following_url":"https://api.github.com/users/nemomobile/following{/other_user}","gists_url":"https://api.github.com/users/nemomobile/gists{/gist_id}","starred_url":"https://api.github.com/users/nemomobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nemomobile/subscriptions","organizations_url":"https://api.github.com/users/nemomobile/orgs","repos_url":"https://api.github.com/users/nemomobile/repos","events_url":"https://api.github.com/users/nemomobile/events{/privacy}","received_events_url":"https://api.github.com/users/nemomobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nemomobile/buteo-sync-plugins-social","description":"","fork":false,"url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social","forks_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/forks","keys_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/teams","hooks_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/hooks","issue_events_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/events{/number}","events_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/events","assignees_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/assignees{/user}","branches_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/branches{/branch}","tags_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/tags","blobs_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/git/refs{/sha}","trees_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/statuses/{sha}","languages_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/languages","stargazers_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/stargazers","contributors_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/contributors","subscribers_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/subscribers","subscription_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/subscription","commits_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/commits{/sha}","git_commits_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/git/commits{/sha}","comments_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/comments{/number}","issue_comment_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/comments{/number}","contents_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/contents/{+path}","compare_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/merges","archive_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/downloads","issues_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues{/number}","pulls_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls{/number}","milestones_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/milestones{/number}","notifications_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/labels{/name}","releases_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/releases{/id}","created_at":"2014-06-12T08:32:31Z","updated_at":"2015-05-07T01:01:31Z","pushed_at":"2015-05-07T07:18:13Z","git_url":"git://github.com/nemomobile/buteo-sync-plugins-social.git","ssh_url":"git@github.com:nemomobile/buteo-sync-plugins-social.git","clone_url":"https://github.com/nemomobile/buteo-sync-plugins-social.git","svn_url":"https://github.com/nemomobile/buteo-sync-plugins-social","homepage":null,"size":2241,"stargazers_count":13,"watchers_count":13,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":13,"default_branch":"master"}},"base":{"label":"nemomobile:master","ref":"master","sha":"b9596111c04182f464b86f41ec12aae89f5d6047","user":{"login":"nemomobile","id":1088947,"avatar_url":"https://avatars.githubusercontent.com/u/1088947?v=3","gravatar_id":"","url":"https://api.github.com/users/nemomobile","html_url":"https://github.com/nemomobile","followers_url":"https://api.github.com/users/nemomobile/followers","following_url":"https://api.github.com/users/nemomobile/following{/other_user}","gists_url":"https://api.github.com/users/nemomobile/gists{/gist_id}","starred_url":"https://api.github.com/users/nemomobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nemomobile/subscriptions","organizations_url":"https://api.github.com/users/nemomobile/orgs","repos_url":"https://api.github.com/users/nemomobile/repos","events_url":"https://api.github.com/users/nemomobile/events{/privacy}","received_events_url":"https://api.github.com/users/nemomobile/received_events","type":"Organization","site_admin":false},"repo":{"id":20760271,"name":"buteo-sync-plugins-social","full_name":"nemomobile/buteo-sync-plugins-social","owner":{"login":"nemomobile","id":1088947,"avatar_url":"https://avatars.githubusercontent.com/u/1088947?v=3","gravatar_id":"","url":"https://api.github.com/users/nemomobile","html_url":"https://github.com/nemomobile","followers_url":"https://api.github.com/users/nemomobile/followers","following_url":"https://api.github.com/users/nemomobile/following{/other_user}","gists_url":"https://api.github.com/users/nemomobile/gists{/gist_id}","starred_url":"https://api.github.com/users/nemomobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nemomobile/subscriptions","organizations_url":"https://api.github.com/users/nemomobile/orgs","repos_url":"https://api.github.com/users/nemomobile/repos","events_url":"https://api.github.com/users/nemomobile/events{/privacy}","received_events_url":"https://api.github.com/users/nemomobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nemomobile/buteo-sync-plugins-social","description":"","fork":false,"url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social","forks_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/forks","keys_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/teams","hooks_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/hooks","issue_events_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/events{/number}","events_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/events","assignees_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/assignees{/user}","branches_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/branches{/branch}","tags_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/tags","blobs_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/git/refs{/sha}","trees_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/statuses/{sha}","languages_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/languages","stargazers_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/stargazers","contributors_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/contributors","subscribers_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/subscribers","subscription_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/subscription","commits_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/commits{/sha}","git_commits_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/git/commits{/sha}","comments_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/comments{/number}","issue_comment_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/comments{/number}","contents_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/contents/{+path}","compare_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/merges","archive_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/downloads","issues_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues{/number}","pulls_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls{/number}","milestones_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/milestones{/number}","notifications_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/labels{/name}","releases_url":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/releases{/id}","created_at":"2014-06-12T08:32:31Z","updated_at":"2015-05-07T01:01:31Z","pushed_at":"2015-05-07T07:18:13Z","git_url":"git://github.com/nemomobile/buteo-sync-plugins-social.git","ssh_url":"git@github.com:nemomobile/buteo-sync-plugins-social.git","clone_url":"https://github.com/nemomobile/buteo-sync-plugins-social.git","svn_url":"https://github.com/nemomobile/buteo-sync-plugins-social","homepage":null,"size":2241,"stargazers_count":13,"watchers_count":13,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls/27"},"html":{"href":"https://github.com/nemomobile/buteo-sync-plugins-social/pull/27"},"issue":{"href":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/27"},"comments":{"href":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/nemomobile/buteo-sync-plugins-social/statuses/6b881046d06a16853cd6cc939b87f6651575a7c8"}}}}