{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/application-services/pulls/comments/231741245","pull_request_review_id":172777010,"id":231741245,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTc0MTI0NQ==","diff_hunk":"@@ -169,6 +169,43 @@ impl<'de> serde::Deserialize<'de> for VisitTransition {\n     }\n }\n \n+// Re SyncStatus - note that:\n+// * logins_sql has synced=0, changed=1, new=2\n+// * desktop bookmarks has unknown=0, new=1, normal=2\n+// This is \"places\", so eventually bookmarks will have a status - should history and bookmarks share it?\n+// Note that history specifically needs neither (a) login's \"changed\" (the changeCounter works there),\n+// nor (b) bookmark's \"unknown\" (as that's only used after a restore)\n+// History only needs a distinction between \"synced\" and \"new\" so it doesn't\n+// accumulate never-to-be-synced tombstones - so we basically copy bookmarks\n+// and treat unknown as new.\n+// Which means we get the \"bonus side-effect\" ;) of ::Unknown replacing Option<>!\n+//\n+// Note that some of these values are in schema.rs\n+#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]\n+#[repr(u8)]\n+pub enum SyncStatus {\n+    Unknown = 0,\n+    New = 1,\n+    Normal = 2,\n+}\n+\n+impl SyncStatus {\n+    #[inline]\n+    pub fn from_u8(v: u8) -> Self {\n+        match v {\n+            1 => SyncStatus::New,\n+            2 => SyncStatus::Normal,\n+            _ => SyncStatus::Unknown,","path":"components/places/src/types.rs","position":30,"original_position":30,"commit_id":"8858ab54ab6c4462f03e9d6c210af357410bbe0e","original_commit_id":"8858ab54ab6c4462f03e9d6c210af357410bbe0e","user":{"login":"thomcc","id":860665,"node_id":"MDQ6VXNlcjg2MDY2NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/860665?v=4","gravatar_id":"","url":"https://api.github.com/users/thomcc","html_url":"https://github.com/thomcc","followers_url":"https://api.github.com/users/thomcc/followers","following_url":"https://api.github.com/users/thomcc/following{/other_user}","gists_url":"https://api.github.com/users/thomcc/gists{/gist_id}","starred_url":"https://api.github.com/users/thomcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomcc/subscriptions","organizations_url":"https://api.github.com/users/thomcc/orgs","repos_url":"https://api.github.com/users/thomcc/repos","events_url":"https://api.github.com/users/thomcc/events{/privacy}","received_events_url":"https://api.github.com/users/thomcc/received_events","type":"User","site_admin":false},"body":"Not really sure this is sane but it's probably fine for now.","created_at":"2018-11-08T01:40:27Z","updated_at":"2018-11-08T01:44:22Z","html_url":"https://github.com/mozilla/application-services/pull/384#discussion_r231741245","pull_request_url":"https://api.github.com/repos/mozilla/application-services/pulls/384","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mozilla/application-services/pulls/comments/231741245"},"html":{"href":"https://github.com/mozilla/application-services/pull/384#discussion_r231741245"},"pull_request":{"href":"https://api.github.com/repos/mozilla/application-services/pulls/384"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/application-services/pulls/384","id":229223022,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5MjIzMDIy","html_url":"https://github.com/mozilla/application-services/pull/384","diff_url":"https://github.com/mozilla/application-services/pull/384.diff","patch_url":"https://github.com/mozilla/application-services/pull/384.patch","issue_url":"https://api.github.com/repos/mozilla/application-services/issues/384","number":384,"state":"open","locked":false,"title":"Add sync_status/sync_change_counter fields, and a moz_places_tombstones table.","user":{"login":"mhammond","id":83924,"node_id":"MDQ6VXNlcjgzOTI0","avatar_url":"https://avatars1.githubusercontent.com/u/83924?v=4","gravatar_id":"","url":"https://api.github.com/users/mhammond","html_url":"https://github.com/mhammond","followers_url":"https://api.github.com/users/mhammond/followers","following_url":"https://api.github.com/users/mhammond/following{/other_user}","gists_url":"https://api.github.com/users/mhammond/gists{/gist_id}","starred_url":"https://api.github.com/users/mhammond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhammond/subscriptions","organizations_url":"https://api.github.com/users/mhammond/orgs","repos_url":"https://api.github.com/users/mhammond/repos","events_url":"https://api.github.com/users/mhammond/events{/privacy}","received_events_url":"https://api.github.com/users/mhammond/received_events","type":"User","site_admin":false},"body":"This adds the fields we've been discussing. I've split it from the \"sync\" commits for ease of reviewing.\r\n\r\nNote that I bumped the schema version but made no attempt to implement a schema migration - that means old DBs will panic, but I think that's fine currently - anyone using this against the reference browser need only uninstall and reinstall the app.","created_at":"2018-11-08T01:31:45Z","updated_at":"2018-11-08T01:44:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"980bc31efb8f0a785cb37f4c7bf3e2947eae2702","assignee":{"login":"mhammond","id":83924,"node_id":"MDQ6VXNlcjgzOTI0","avatar_url":"https://avatars1.githubusercontent.com/u/83924?v=4","gravatar_id":"","url":"https://api.github.com/users/mhammond","html_url":"https://github.com/mhammond","followers_url":"https://api.github.com/users/mhammond/followers","following_url":"https://api.github.com/users/mhammond/following{/other_user}","gists_url":"https://api.github.com/users/mhammond/gists{/gist_id}","starred_url":"https://api.github.com/users/mhammond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhammond/subscriptions","organizations_url":"https://api.github.com/users/mhammond/orgs","repos_url":"https://api.github.com/users/mhammond/repos","events_url":"https://api.github.com/users/mhammond/events{/privacy}","received_events_url":"https://api.github.com/users/mhammond/received_events","type":"User","site_admin":false},"assignees":[{"login":"mhammond","id":83924,"node_id":"MDQ6VXNlcjgzOTI0","avatar_url":"https://avatars1.githubusercontent.com/u/83924?v=4","gravatar_id":"","url":"https://api.github.com/users/mhammond","html_url":"https://github.com/mhammond","followers_url":"https://api.github.com/users/mhammond/followers","following_url":"https://api.github.com/users/mhammond/following{/other_user}","gists_url":"https://api.github.com/users/mhammond/gists{/gist_id}","starred_url":"https://api.github.com/users/mhammond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhammond/subscriptions","organizations_url":"https://api.github.com/users/mhammond/orgs","repos_url":"https://api.github.com/users/mhammond/repos","events_url":"https://api.github.com/users/mhammond/events{/privacy}","received_events_url":"https://api.github.com/users/mhammond/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"linacambridge","id":41387967,"node_id":"MDQ6VXNlcjQxMzg3OTY3","avatar_url":"https://avatars3.githubusercontent.com/u/41387967?v=4","gravatar_id":"","url":"https://api.github.com/users/linacambridge","html_url":"https://github.com/linacambridge","followers_url":"https://api.github.com/users/linacambridge/followers","following_url":"https://api.github.com/users/linacambridge/following{/other_user}","gists_url":"https://api.github.com/users/linacambridge/gists{/gist_id}","starred_url":"https://api.github.com/users/linacambridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linacambridge/subscriptions","organizations_url":"https://api.github.com/users/linacambridge/orgs","repos_url":"https://api.github.com/users/linacambridge/repos","events_url":"https://api.github.com/users/linacambridge/events{/privacy}","received_events_url":"https://api.github.com/users/linacambridge/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/application-services/pulls/384/commits","review_comments_url":"https://api.github.com/repos/mozilla/application-services/pulls/384/comments","review_comment_url":"https://api.github.com/repos/mozilla/application-services/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/application-services/issues/384/comments","statuses_url":"https://api.github.com/repos/mozilla/application-services/statuses/8858ab54ab6c4462f03e9d6c210af357410bbe0e","head":{"label":"mozilla:history-changecounters","ref":"history-changecounters","sha":"8858ab54ab6c4462f03e9d6c210af357410bbe0e","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":129966583,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk5NjY1ODM=","name":"application-services","full_name":"mozilla/application-services","private":false,"owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mozilla/application-services","description":"Firefox Application Services","fork":false,"url":"https://api.github.com/repos/mozilla/application-services","forks_url":"https://api.github.com/repos/mozilla/application-services/forks","keys_url":"https://api.github.com/repos/mozilla/application-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/application-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/application-services/teams","hooks_url":"https://api.github.com/repos/mozilla/application-services/hooks","issue_events_url":"https://api.github.com/repos/mozilla/application-services/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/application-services/events","assignees_url":"https://api.github.com/repos/mozilla/application-services/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/application-services/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/application-services/tags","blobs_url":"https://api.github.com/repos/mozilla/application-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/application-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/application-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/application-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/application-services/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/application-services/languages","stargazers_url":"https://api.github.com/repos/mozilla/application-services/stargazers","contributors_url":"https://api.github.com/repos/mozilla/application-services/contributors","subscribers_url":"https://api.github.com/repos/mozilla/application-services/subscribers","subscription_url":"https://api.github.com/repos/mozilla/application-services/subscription","commits_url":"https://api.github.com/repos/mozilla/application-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/application-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/application-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/application-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/application-services/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/application-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/application-services/merges","archive_url":"https://api.github.com/repos/mozilla/application-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/application-services/downloads","issues_url":"https://api.github.com/repos/mozilla/application-services/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/application-services/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/application-services/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/application-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/application-services/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/application-services/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/application-services/deployments","created_at":"2018-04-17T21:20:37Z","updated_at":"2018-11-07T06:58:55Z","pushed_at":"2018-11-08T01:31:45Z","git_url":"git://github.com/mozilla/application-services.git","ssh_url":"git@github.com:mozilla/application-services.git","clone_url":"https://github.com/mozilla/application-services.git","svn_url":"https://github.com/mozilla/application-services","homepage":"https://mozilla.github.io/application-services/","size":41915,"stargazers_count":32,"watchers_count":32,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":73,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":17,"open_issues":73,"watchers":32,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"bca0eb01a288b0be7d9e8f82323b20dc613d0066","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":129966583,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk5NjY1ODM=","name":"application-services","full_name":"mozilla/application-services","private":false,"owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mozilla/application-services","description":"Firefox Application Services","fork":false,"url":"https://api.github.com/repos/mozilla/application-services","forks_url":"https://api.github.com/repos/mozilla/application-services/forks","keys_url":"https://api.github.com/repos/mozilla/application-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/application-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/application-services/teams","hooks_url":"https://api.github.com/repos/mozilla/application-services/hooks","issue_events_url":"https://api.github.com/repos/mozilla/application-services/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/application-services/events","assignees_url":"https://api.github.com/repos/mozilla/application-services/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/application-services/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/application-services/tags","blobs_url":"https://api.github.com/repos/mozilla/application-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/application-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/application-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/application-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/application-services/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/application-services/languages","stargazers_url":"https://api.github.com/repos/mozilla/application-services/stargazers","contributors_url":"https://api.github.com/repos/mozilla/application-services/contributors","subscribers_url":"https://api.github.com/repos/mozilla/application-services/subscribers","subscription_url":"https://api.github.com/repos/mozilla/application-services/subscription","commits_url":"https://api.github.com/repos/mozilla/application-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/application-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/application-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/application-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/application-services/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/application-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/application-services/merges","archive_url":"https://api.github.com/repos/mozilla/application-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/application-services/downloads","issues_url":"https://api.github.com/repos/mozilla/application-services/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/application-services/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/application-services/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/application-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/application-services/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/application-services/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/application-services/deployments","created_at":"2018-04-17T21:20:37Z","updated_at":"2018-11-07T06:58:55Z","pushed_at":"2018-11-08T01:31:45Z","git_url":"git://github.com/mozilla/application-services.git","ssh_url":"git@github.com:mozilla/application-services.git","clone_url":"https://github.com/mozilla/application-services.git","svn_url":"https://github.com/mozilla/application-services","homepage":"https://mozilla.github.io/application-services/","size":41915,"stargazers_count":32,"watchers_count":32,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":73,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":17,"open_issues":73,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/application-services/pulls/384"},"html":{"href":"https://github.com/mozilla/application-services/pull/384"},"issue":{"href":"https://api.github.com/repos/mozilla/application-services/issues/384"},"comments":{"href":"https://api.github.com/repos/mozilla/application-services/issues/384/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/application-services/pulls/384/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/application-services/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/application-services/pulls/384/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/application-services/statuses/8858ab54ab6c4462f03e9d6c210af357410bbe0e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"thomcc"}}