{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/46395908","id":46395908,"diff_hunk":"@@ -219,9 +219,10 @@\n       // Remove child immediately, datastore operations can be quite slow\n       this.removeCard(this.selectedCard);\n \n+      var revId = this.pagesStore.datastore.revisionId;\n       this.pagesStore.get(id).then(entry => {\n         entry.data.pinned = false;\n-        this.pagesStore.datastore.put(entry.data, id).then(() => {},\n+        this.pagesStore.datastore.put(entry.data, id, revId).then(() => {},","path":"apps/homescreen/js/pages.js","position":8,"original_position":8,"commit_id":"be2f23b2a1e1add44866008cbeccc9a43fbd3bca","original_commit_id":"7ee37647f04b1446201a80d8e7985bcbd4d58811","user":{"login":"Cwiiis","id":668518,"avatar_url":"https://avatars.githubusercontent.com/u/668518?v=3","gravatar_id":"","url":"https://api.github.com/users/Cwiiis","html_url":"https://github.com/Cwiiis","followers_url":"https://api.github.com/users/Cwiiis/followers","following_url":"https://api.github.com/users/Cwiiis/following{/other_user}","gists_url":"https://api.github.com/users/Cwiiis/gists{/gist_id}","starred_url":"https://api.github.com/users/Cwiiis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cwiiis/subscriptions","organizations_url":"https://api.github.com/users/Cwiiis/orgs","repos_url":"https://api.github.com/users/Cwiiis/repos","events_url":"https://api.github.com/users/Cwiiis/events{/privacy}","received_events_url":"https://api.github.com/users/Cwiiis/received_events","type":"User","site_admin":false},"body":"Perhaps rather than showing a warning, it could just retry in X time (say 10 seconds) up to Y times (say 6 times)? It seems unlikely that it would fail over the course of a minute I would suppose, but if it did, perhaps we could show the warning then and add the pinned site back to the container? That last bit could be done by instead of immediately removing, setting display:none on the item and running .synchronise on the container - then if it fails, you can remove the display:none and run synchronise again to show it, and actually remove it on success.","created_at":"2015-12-02T10:05:18Z","updated_at":"2015-12-02T10:05:18Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/33462#discussion_r46395908","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33462","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/46395908"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/33462#discussion_r46395908"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33462"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33462","id":52255621,"html_url":"https://github.com/mozilla-b2g/gaia/pull/33462","diff_url":"https://github.com/mozilla-b2g/gaia/pull/33462.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/33462.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33462","number":33462,"state":"open","locked":false,"title":"Bug 1225809 - Conflict-safe homescreen unpinning, r=Cwiiis","user":{"login":"michielbdejong","id":408412,"avatar_url":"https://avatars.githubusercontent.com/u/408412?v=3","gravatar_id":"","url":"https://api.github.com/users/michielbdejong","html_url":"https://github.com/michielbdejong","followers_url":"https://api.github.com/users/michielbdejong/followers","following_url":"https://api.github.com/users/michielbdejong/following{/other_user}","gists_url":"https://api.github.com/users/michielbdejong/gists{/gist_id}","starred_url":"https://api.github.com/users/michielbdejong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michielbdejong/subscriptions","organizations_url":"https://api.github.com/users/michielbdejong/orgs","repos_url":"https://api.github.com/users/michielbdejong/repos","events_url":"https://api.github.com/users/michielbdejong/events{/privacy}","received_events_url":"https://api.github.com/users/michielbdejong/received_events","type":"User","site_admin":false},"body":"With this change, unpinning a page will fail (instead of leading to data corruption) in the unlikely event that a change for that same URL is imported from Firefox Sync at the same time.","created_at":"2015-12-01T13:09:30Z","updated_at":"2015-12-02T10:05:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"035e9208938e75c87560ef90b0a7a928f427bcc7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33462/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33462/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33462/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/be2f23b2a1e1add44866008cbeccc9a43fbd3bca","head":{"label":"michielbdejong:1225809-safer-unpinning-code","ref":"1225809-safer-unpinning-code","sha":"be2f23b2a1e1add44866008cbeccc9a43fbd3bca","user":{"login":"michielbdejong","id":408412,"avatar_url":"https://avatars.githubusercontent.com/u/408412?v=3","gravatar_id":"","url":"https://api.github.com/users/michielbdejong","html_url":"https://github.com/michielbdejong","followers_url":"https://api.github.com/users/michielbdejong/followers","following_url":"https://api.github.com/users/michielbdejong/following{/other_user}","gists_url":"https://api.github.com/users/michielbdejong/gists{/gist_id}","starred_url":"https://api.github.com/users/michielbdejong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michielbdejong/subscriptions","organizations_url":"https://api.github.com/users/michielbdejong/orgs","repos_url":"https://api.github.com/users/michielbdejong/repos","events_url":"https://api.github.com/users/michielbdejong/events{/privacy}","received_events_url":"https://api.github.com/users/michielbdejong/received_events","type":"User","site_admin":false},"repo":{"id":32516991,"name":"gaia","full_name":"michielbdejong/gaia","owner":{"login":"michielbdejong","id":408412,"avatar_url":"https://avatars.githubusercontent.com/u/408412?v=3","gravatar_id":"","url":"https://api.github.com/users/michielbdejong","html_url":"https://github.com/michielbdejong","followers_url":"https://api.github.com/users/michielbdejong/followers","following_url":"https://api.github.com/users/michielbdejong/following{/other_user}","gists_url":"https://api.github.com/users/michielbdejong/gists{/gist_id}","starred_url":"https://api.github.com/users/michielbdejong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michielbdejong/subscriptions","organizations_url":"https://api.github.com/users/michielbdejong/orgs","repos_url":"https://api.github.com/users/michielbdejong/repos","events_url":"https://api.github.com/users/michielbdejong/events{/privacy}","received_events_url":"https://api.github.com/users/michielbdejong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michielbdejong/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":true,"url":"https://api.github.com/repos/michielbdejong/gaia","forks_url":"https://api.github.com/repos/michielbdejong/gaia/forks","keys_url":"https://api.github.com/repos/michielbdejong/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michielbdejong/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michielbdejong/gaia/teams","hooks_url":"https://api.github.com/repos/michielbdejong/gaia/hooks","issue_events_url":"https://api.github.com/repos/michielbdejong/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/michielbdejong/gaia/events","assignees_url":"https://api.github.com/repos/michielbdejong/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/michielbdejong/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/michielbdejong/gaia/tags","blobs_url":"https://api.github.com/repos/michielbdejong/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michielbdejong/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michielbdejong/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/michielbdejong/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michielbdejong/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/michielbdejong/gaia/languages","stargazers_url":"https://api.github.com/repos/michielbdejong/gaia/stargazers","contributors_url":"https://api.github.com/repos/michielbdejong/gaia/contributors","subscribers_url":"https://api.github.com/repos/michielbdejong/gaia/subscribers","subscription_url":"https://api.github.com/repos/michielbdejong/gaia/subscription","commits_url":"https://api.github.com/repos/michielbdejong/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/michielbdejong/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/michielbdejong/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/michielbdejong/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/michielbdejong/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/michielbdejong/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michielbdejong/gaia/merges","archive_url":"https://api.github.com/repos/michielbdejong/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michielbdejong/gaia/downloads","issues_url":"https://api.github.com/repos/michielbdejong/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/michielbdejong/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/michielbdejong/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/michielbdejong/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michielbdejong/gaia/labels{/name}","releases_url":"https://api.github.com/repos/michielbdejong/gaia/releases{/id}","created_at":"2015-03-19T11:15:53Z","updated_at":"2015-03-19T11:16:20Z","pushed_at":"2015-12-02T10:04:11Z","git_url":"git://github.com/michielbdejong/gaia.git","ssh_url":"git@github.com:michielbdejong/gaia.git","clone_url":"https://github.com/michielbdejong/gaia.git","svn_url":"https://github.com/michielbdejong/gaia","homepage":"https://wiki.mozilla.org/B2G","size":996522,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"64174a5ab27adfc0329d693d867c493a224f4e2c","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2015-12-01T14:52:33Z","pushed_at":"2015-12-02T09:58:14Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1186689,"stargazers_count":2013,"watchers_count":2013,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2565,"mirror_url":null,"open_issues_count":1277,"forks":2565,"open_issues":1277,"watchers":2013,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33462"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/33462"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33462"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33462/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33462/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33462/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/be2f23b2a1e1add44866008cbeccc9a43fbd3bca"}}}}