{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-services/readinglist/pulls/comments/23522785","id":23522785,"diff_hunk":"@@ -20,9 +21,18 @@ def flush(self):\n     def ping(self):\n         return True\n \n+    def revision(self, user_id):\n+        return self._revisions[user_id]\n+\n+    def _bump_revision(self, user_id):\n+        self._revisions[user_id] += 1\n+        return self._revisions[user_id]\n+\n     def create(self, resource, user_id, record):\n         resource_name = classname(resource)\n         _id = record[resource.id_field] = self.id_generator()\n+        revision = self._bump_revision(user_id)","path":"readinglist/backend/memory.py","position":22,"original_position":22,"commit_id":"884df254af125a4542ef294bf4074453a1c519dd","original_commit_id":"884df254af125a4542ef294bf4074453a1c519dd","user":{"login":"tarekziade","id":250019,"avatar_url":"https://avatars.githubusercontent.com/u/250019?v=3","gravatar_id":"","url":"https://api.github.com/users/tarekziade","html_url":"https://github.com/tarekziade","followers_url":"https://api.github.com/users/tarekziade/followers","following_url":"https://api.github.com/users/tarekziade/following{/other_user}","gists_url":"https://api.github.com/users/tarekziade/gists{/gist_id}","starred_url":"https://api.github.com/users/tarekziade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarekziade/subscriptions","organizations_url":"https://api.github.com/users/tarekziade/orgs","repos_url":"https://api.github.com/users/tarekziade/repos","events_url":"https://api.github.com/users/tarekziade/events{/privacy}","received_events_url":"https://api.github.com/users/tarekziade/received_events","type":"User","site_admin":false},"body":"could be a single line I guess","created_at":"2015-01-26T10:55:37Z","updated_at":"2015-01-26T10:55:37Z","html_url":"https://github.com/mozilla-services/readinglist/pull/60#discussion_r23522785","pull_request_url":"https://api.github.com/repos/mozilla-services/readinglist/pulls/60","_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/readinglist/pulls/comments/23522785"},"html":{"href":"https://github.com/mozilla-services/readinglist/pull/60#discussion_r23522785"},"pull_request":{"href":"https://api.github.com/repos/mozilla-services/readinglist/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-services/readinglist/pulls/60","id":27925857,"html_url":"https://github.com/mozilla-services/readinglist/pull/60","diff_url":"https://github.com/mozilla-services/readinglist/pull/60.diff","patch_url":"https://github.com/mozilla-services/readinglist/pull/60.patch","issue_url":"https://api.github.com/repos/mozilla-services/readinglist/issues/60","number":60,"state":"open","locked":false,"title":"Preconditions headers","user":{"login":"leplatrem","id":546692,"avatar_url":"https://avatars.githubusercontent.com/u/546692?v=3","gravatar_id":"","url":"https://api.github.com/users/leplatrem","html_url":"https://github.com/leplatrem","followers_url":"https://api.github.com/users/leplatrem/followers","following_url":"https://api.github.com/users/leplatrem/following{/other_user}","gists_url":"https://api.github.com/users/leplatrem/gists{/gist_id}","starred_url":"https://api.github.com/users/leplatrem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leplatrem/subscriptions","organizations_url":"https://api.github.com/users/leplatrem/orgs","repos_url":"https://api.github.com/users/leplatrem/repos","events_url":"https://api.github.com/users/leplatrem/events{/privacy}","received_events_url":"https://api.github.com/users/leplatrem/received_events","type":"User","site_admin":false},"body":"Based on PR #57\r\n\r\n* [x] small refactor of single record fetch\r\n* [x] views decorators\r\n* [x] 304 on GET collection and GET single record\r\n* [x] 412 basically everywhere\r\n* [x] Format 412 errors with proper attributes\r\n\r\nQuestions: \r\n* Should 412 be returned on GET requests with ``If-Unmodified-Since`` ?\r\n* Group decorators into a single one ?","created_at":"2015-01-23T14:12:45Z","updated_at":"2015-01-26T10:55:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"088b9a9a7061f30d5ded3f6f668b1f4c41e91a15","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-services/readinglist/pulls/60/commits","review_comments_url":"https://api.github.com/repos/mozilla-services/readinglist/pulls/60/comments","review_comment_url":"https://api.github.com/repos/mozilla-services/readinglist/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla-services/readinglist/issues/60/comments","statuses_url":"https://api.github.com/repos/mozilla-services/readinglist/statuses/884df254af125a4542ef294bf4074453a1c519dd","head":{"label":"mozilla-services:40-preconditions-headers","ref":"40-preconditions-headers","sha":"884df254af125a4542ef294bf4074453a1c519dd","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":27563721,"name":"readinglist","full_name":"mozilla-services/readinglist","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/readinglist","description":"Reading List Server","fork":false,"url":"https://api.github.com/repos/mozilla-services/readinglist","forks_url":"https://api.github.com/repos/mozilla-services/readinglist/forks","keys_url":"https://api.github.com/repos/mozilla-services/readinglist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/readinglist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/readinglist/teams","hooks_url":"https://api.github.com/repos/mozilla-services/readinglist/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/readinglist/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/readinglist/events","assignees_url":"https://api.github.com/repos/mozilla-services/readinglist/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/readinglist/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/readinglist/tags","blobs_url":"https://api.github.com/repos/mozilla-services/readinglist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/readinglist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/readinglist/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/readinglist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/readinglist/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/readinglist/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/readinglist/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/readinglist/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/readinglist/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/readinglist/subscription","commits_url":"https://api.github.com/repos/mozilla-services/readinglist/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/readinglist/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/readinglist/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/readinglist/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-services/readinglist/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/readinglist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/readinglist/merges","archive_url":"https://api.github.com/repos/mozilla-services/readinglist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/readinglist/downloads","issues_url":"https://api.github.com/repos/mozilla-services/readinglist/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/readinglist/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/readinglist/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/readinglist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/readinglist/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/readinglist/releases{/id}","created_at":"2014-12-04T22:48:28Z","updated_at":"2015-01-26T10:48:51Z","pushed_at":"2015-01-26T10:48:52Z","git_url":"git://github.com/mozilla-services/readinglist.git","ssh_url":"git@github.com:mozilla-services/readinglist.git","clone_url":"https://github.com/mozilla-services/readinglist.git","svn_url":"https://github.com/mozilla-services/readinglist","homepage":null,"size":1728,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":36,"forks":1,"open_issues":36,"watchers":4,"default_branch":"master"}},"base":{"label":"mozilla-services:master","ref":"master","sha":"05bfa6a84bc7a7b3e363008c887a4387f11c51f9","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":27563721,"name":"readinglist","full_name":"mozilla-services/readinglist","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/readinglist","description":"Reading List Server","fork":false,"url":"https://api.github.com/repos/mozilla-services/readinglist","forks_url":"https://api.github.com/repos/mozilla-services/readinglist/forks","keys_url":"https://api.github.com/repos/mozilla-services/readinglist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/readinglist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/readinglist/teams","hooks_url":"https://api.github.com/repos/mozilla-services/readinglist/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/readinglist/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/readinglist/events","assignees_url":"https://api.github.com/repos/mozilla-services/readinglist/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/readinglist/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/readinglist/tags","blobs_url":"https://api.github.com/repos/mozilla-services/readinglist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/readinglist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/readinglist/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/readinglist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/readinglist/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/readinglist/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/readinglist/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/readinglist/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/readinglist/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/readinglist/subscription","commits_url":"https://api.github.com/repos/mozilla-services/readinglist/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/readinglist/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/readinglist/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/readinglist/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-services/readinglist/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/readinglist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/readinglist/merges","archive_url":"https://api.github.com/repos/mozilla-services/readinglist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/readinglist/downloads","issues_url":"https://api.github.com/repos/mozilla-services/readinglist/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/readinglist/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/readinglist/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/readinglist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/readinglist/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/readinglist/releases{/id}","created_at":"2014-12-04T22:48:28Z","updated_at":"2015-01-26T10:48:51Z","pushed_at":"2015-01-26T10:48:52Z","git_url":"git://github.com/mozilla-services/readinglist.git","ssh_url":"git@github.com:mozilla-services/readinglist.git","clone_url":"https://github.com/mozilla-services/readinglist.git","svn_url":"https://github.com/mozilla-services/readinglist","homepage":null,"size":1728,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":36,"forks":1,"open_issues":36,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/readinglist/pulls/60"},"html":{"href":"https://github.com/mozilla-services/readinglist/pull/60"},"issue":{"href":"https://api.github.com/repos/mozilla-services/readinglist/issues/60"},"comments":{"href":"https://api.github.com/repos/mozilla-services/readinglist/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-services/readinglist/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-services/readinglist/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla-services/readinglist/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-services/readinglist/statuses/884df254af125a4542ef294bf4074453a1c519dd"}}}}