{"action":"created","comment":{"url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/comments/30848847","id":30848847,"diff_hunk":"@@ -201,6 +201,48 @@ def stringify_files(files)\n     end\n     alias download_as_string stringify_files # create alias\n \n+    # Generate and write the SVN authorization file for the repo.\n+    def self.__generate_authz_file\n+      return true if !MarkusConfigurator.markus_config_repository_admin?\n+      valid_groupings_and_members = {}\n+      assignments = Assignment.all\n+      assignments.each do |assignment|\n+        valid_groupings = assignment.valid_groupings\n+        valid_groupings.each do |gr|\n+          accepted_students = gr.accepted_students\n+          accepted_students = accepted_students.map { |student| student.user_name }\n+          valid_groupings_and_members[gr.group.repo_name] = accepted_students\n+        end\n+      end\n+      tas = Ta.all\n+      tas = tas.map { |ta| ta.user_name }\n+      admins = Admin.all\n+      admins = admins.map { |admin| admin.user_name }\n+      tas_and_admins = tas + admins\n+      invalid_groups = Group.all\n+      invalid_groups = invalid_groups.map { |group| group.repository_name }\n+      authz_string = \"\"","path":"lib/repo/subversion_repository.rb","position":24,"original_position":24,"commit_id":"03d1b35201123baddd3dfe53434316465d5368f5","original_commit_id":"03d1b35201123baddd3dfe53434316465d5368f5","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","created_at":"2015-05-21T21:18:49Z","updated_at":"2015-05-21T21:18:49Z","html_url":"https://github.com/MarkUsProject/Markus/pull/2168#discussion_r30848847","pull_request_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2168","_links":{"self":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/comments/30848847"},"html":{"href":"https://github.com/MarkUsProject/Markus/pull/2168#discussion_r30848847"},"pull_request":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2168"}}},"pull_request":{"url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2168","id":35978760,"html_url":"https://github.com/MarkUsProject/Markus/pull/2168","diff_url":"https://github.com/MarkUsProject/Markus/pull/2168.diff","patch_url":"https://github.com/MarkUsProject/Markus/pull/2168.patch","issue_url":"https://api.github.com/repos/MarkUsProject/Markus/issues/2168","number":2168,"state":"open","locked":false,"title":"Issue 1766","user":{"login":"hootiehoo","id":6080472,"avatar_url":"https://avatars.githubusercontent.com/u/6080472?v=3","gravatar_id":"","url":"https://api.github.com/users/hootiehoo","html_url":"https://github.com/hootiehoo","followers_url":"https://api.github.com/users/hootiehoo/followers","following_url":"https://api.github.com/users/hootiehoo/following{/other_user}","gists_url":"https://api.github.com/users/hootiehoo/gists{/gist_id}","starred_url":"https://api.github.com/users/hootiehoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hootiehoo/subscriptions","organizations_url":"https://api.github.com/users/hootiehoo/orgs","repos_url":"https://api.github.com/users/hootiehoo/repos","events_url":"https://api.github.com/users/hootiehoo/events{/privacy}","received_events_url":"https://api.github.com/users/hootiehoo/received_events","type":"User","site_admin":false},"body":"When uploading a csv, the auth file now only gets rewritten once at the end, rather than once per group. This is done using the new method __generate_authz_file in the SubversionRepository class.\r\n\r\nThese changes speed up the process considerably. Before, uploading 600 names with allow_web_submits=true took 1:35 seconds. It now takes 35 seconds. And where uploading 600 names with allow_web_submits=false took 3 minutes, now takes 1.\r\n\r\nI also added the names in students.csv into longstudents.csv, so students.csv is a proper subset of longstudents.csv. This should prevent future bugs when testing with longstudents.csv.","created_at":"2015-05-21T21:18:42Z","updated_at":"2015-05-21T21:18:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0de3db18f303dc84f9a6d68009e2ebe61a2c9341","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2168/commits","review_comments_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2168/comments","review_comment_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MarkUsProject/Markus/issues/2168/comments","statuses_url":"https://api.github.com/repos/MarkUsProject/Markus/statuses/03d1b35201123baddd3dfe53434316465d5368f5","head":{"label":"hootiehoo:issue-1766","ref":"issue-1766","sha":"03d1b35201123baddd3dfe53434316465d5368f5","user":{"login":"hootiehoo","id":6080472,"avatar_url":"https://avatars.githubusercontent.com/u/6080472?v=3","gravatar_id":"","url":"https://api.github.com/users/hootiehoo","html_url":"https://github.com/hootiehoo","followers_url":"https://api.github.com/users/hootiehoo/followers","following_url":"https://api.github.com/users/hootiehoo/following{/other_user}","gists_url":"https://api.github.com/users/hootiehoo/gists{/gist_id}","starred_url":"https://api.github.com/users/hootiehoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hootiehoo/subscriptions","organizations_url":"https://api.github.com/users/hootiehoo/orgs","repos_url":"https://api.github.com/users/hootiehoo/repos","events_url":"https://api.github.com/users/hootiehoo/events{/privacy}","received_events_url":"https://api.github.com/users/hootiehoo/received_events","type":"User","site_admin":false},"repo":{"id":35430363,"name":"Markus","full_name":"hootiehoo/Markus","owner":{"login":"hootiehoo","id":6080472,"avatar_url":"https://avatars.githubusercontent.com/u/6080472?v=3","gravatar_id":"","url":"https://api.github.com/users/hootiehoo","html_url":"https://github.com/hootiehoo","followers_url":"https://api.github.com/users/hootiehoo/followers","following_url":"https://api.github.com/users/hootiehoo/following{/other_user}","gists_url":"https://api.github.com/users/hootiehoo/gists{/gist_id}","starred_url":"https://api.github.com/users/hootiehoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hootiehoo/subscriptions","organizations_url":"https://api.github.com/users/hootiehoo/orgs","repos_url":"https://api.github.com/users/hootiehoo/repos","events_url":"https://api.github.com/users/hootiehoo/events{/privacy}","received_events_url":"https://api.github.com/users/hootiehoo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hootiehoo/Markus","description":"Git repository of MarkUs","fork":true,"url":"https://api.github.com/repos/hootiehoo/Markus","forks_url":"https://api.github.com/repos/hootiehoo/Markus/forks","keys_url":"https://api.github.com/repos/hootiehoo/Markus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hootiehoo/Markus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hootiehoo/Markus/teams","hooks_url":"https://api.github.com/repos/hootiehoo/Markus/hooks","issue_events_url":"https://api.github.com/repos/hootiehoo/Markus/issues/events{/number}","events_url":"https://api.github.com/repos/hootiehoo/Markus/events","assignees_url":"https://api.github.com/repos/hootiehoo/Markus/assignees{/user}","branches_url":"https://api.github.com/repos/hootiehoo/Markus/branches{/branch}","tags_url":"https://api.github.com/repos/hootiehoo/Markus/tags","blobs_url":"https://api.github.com/repos/hootiehoo/Markus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hootiehoo/Markus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hootiehoo/Markus/git/refs{/sha}","trees_url":"https://api.github.com/repos/hootiehoo/Markus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hootiehoo/Markus/statuses/{sha}","languages_url":"https://api.github.com/repos/hootiehoo/Markus/languages","stargazers_url":"https://api.github.com/repos/hootiehoo/Markus/stargazers","contributors_url":"https://api.github.com/repos/hootiehoo/Markus/contributors","subscribers_url":"https://api.github.com/repos/hootiehoo/Markus/subscribers","subscription_url":"https://api.github.com/repos/hootiehoo/Markus/subscription","commits_url":"https://api.github.com/repos/hootiehoo/Markus/commits{/sha}","git_commits_url":"https://api.github.com/repos/hootiehoo/Markus/git/commits{/sha}","comments_url":"https://api.github.com/repos/hootiehoo/Markus/comments{/number}","issue_comment_url":"https://api.github.com/repos/hootiehoo/Markus/issues/comments{/number}","contents_url":"https://api.github.com/repos/hootiehoo/Markus/contents/{+path}","compare_url":"https://api.github.com/repos/hootiehoo/Markus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hootiehoo/Markus/merges","archive_url":"https://api.github.com/repos/hootiehoo/Markus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hootiehoo/Markus/downloads","issues_url":"https://api.github.com/repos/hootiehoo/Markus/issues{/number}","pulls_url":"https://api.github.com/repos/hootiehoo/Markus/pulls{/number}","milestones_url":"https://api.github.com/repos/hootiehoo/Markus/milestones{/number}","notifications_url":"https://api.github.com/repos/hootiehoo/Markus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hootiehoo/Markus/labels{/name}","releases_url":"https://api.github.com/repos/hootiehoo/Markus/releases{/id}","created_at":"2015-05-11T14:52:13Z","updated_at":"2015-05-11T14:52:17Z","pushed_at":"2015-05-21T21:18:15Z","git_url":"git://github.com/hootiehoo/Markus.git","ssh_url":"git@github.com:hootiehoo/Markus.git","clone_url":"https://github.com/hootiehoo/Markus.git","svn_url":"https://github.com/hootiehoo/Markus","homepage":"http://www.markusproject.org","size":22174,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"MarkUsProject:master","ref":"master","sha":"509bd79c210777b538dd2ed36733acff5e1c5989","user":{"login":"MarkUsProject","id":415874,"avatar_url":"https://avatars.githubusercontent.com/u/415874?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkUsProject","html_url":"https://github.com/MarkUsProject","followers_url":"https://api.github.com/users/MarkUsProject/followers","following_url":"https://api.github.com/users/MarkUsProject/following{/other_user}","gists_url":"https://api.github.com/users/MarkUsProject/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkUsProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkUsProject/subscriptions","organizations_url":"https://api.github.com/users/MarkUsProject/orgs","repos_url":"https://api.github.com/users/MarkUsProject/repos","events_url":"https://api.github.com/users/MarkUsProject/events{/privacy}","received_events_url":"https://api.github.com/users/MarkUsProject/received_events","type":"Organization","site_admin":false},"repo":{"id":940538,"name":"Markus","full_name":"MarkUsProject/Markus","owner":{"login":"MarkUsProject","id":415874,"avatar_url":"https://avatars.githubusercontent.com/u/415874?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkUsProject","html_url":"https://github.com/MarkUsProject","followers_url":"https://api.github.com/users/MarkUsProject/followers","following_url":"https://api.github.com/users/MarkUsProject/following{/other_user}","gists_url":"https://api.github.com/users/MarkUsProject/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkUsProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkUsProject/subscriptions","organizations_url":"https://api.github.com/users/MarkUsProject/orgs","repos_url":"https://api.github.com/users/MarkUsProject/repos","events_url":"https://api.github.com/users/MarkUsProject/events{/privacy}","received_events_url":"https://api.github.com/users/MarkUsProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MarkUsProject/Markus","description":"Git repository of MarkUs","fork":false,"url":"https://api.github.com/repos/MarkUsProject/Markus","forks_url":"https://api.github.com/repos/MarkUsProject/Markus/forks","keys_url":"https://api.github.com/repos/MarkUsProject/Markus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MarkUsProject/Markus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MarkUsProject/Markus/teams","hooks_url":"https://api.github.com/repos/MarkUsProject/Markus/hooks","issue_events_url":"https://api.github.com/repos/MarkUsProject/Markus/issues/events{/number}","events_url":"https://api.github.com/repos/MarkUsProject/Markus/events","assignees_url":"https://api.github.com/repos/MarkUsProject/Markus/assignees{/user}","branches_url":"https://api.github.com/repos/MarkUsProject/Markus/branches{/branch}","tags_url":"https://api.github.com/repos/MarkUsProject/Markus/tags","blobs_url":"https://api.github.com/repos/MarkUsProject/Markus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MarkUsProject/Markus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MarkUsProject/Markus/git/refs{/sha}","trees_url":"https://api.github.com/repos/MarkUsProject/Markus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MarkUsProject/Markus/statuses/{sha}","languages_url":"https://api.github.com/repos/MarkUsProject/Markus/languages","stargazers_url":"https://api.github.com/repos/MarkUsProject/Markus/stargazers","contributors_url":"https://api.github.com/repos/MarkUsProject/Markus/contributors","subscribers_url":"https://api.github.com/repos/MarkUsProject/Markus/subscribers","subscription_url":"https://api.github.com/repos/MarkUsProject/Markus/subscription","commits_url":"https://api.github.com/repos/MarkUsProject/Markus/commits{/sha}","git_commits_url":"https://api.github.com/repos/MarkUsProject/Markus/git/commits{/sha}","comments_url":"https://api.github.com/repos/MarkUsProject/Markus/comments{/number}","issue_comment_url":"https://api.github.com/repos/MarkUsProject/Markus/issues/comments{/number}","contents_url":"https://api.github.com/repos/MarkUsProject/Markus/contents/{+path}","compare_url":"https://api.github.com/repos/MarkUsProject/Markus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MarkUsProject/Markus/merges","archive_url":"https://api.github.com/repos/MarkUsProject/Markus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MarkUsProject/Markus/downloads","issues_url":"https://api.github.com/repos/MarkUsProject/Markus/issues{/number}","pulls_url":"https://api.github.com/repos/MarkUsProject/Markus/pulls{/number}","milestones_url":"https://api.github.com/repos/MarkUsProject/Markus/milestones{/number}","notifications_url":"https://api.github.com/repos/MarkUsProject/Markus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MarkUsProject/Markus/labels{/name}","releases_url":"https://api.github.com/repos/MarkUsProject/Markus/releases{/id}","created_at":"2010-09-26T16:18:08Z","updated_at":"2015-05-11T07:04:07Z","pushed_at":"2015-05-21T21:18:43Z","git_url":"git://github.com/MarkUsProject/Markus.git","ssh_url":"git@github.com:MarkUsProject/Markus.git","clone_url":"https://github.com/MarkUsProject/Markus.git","svn_url":"https://github.com/MarkUsProject/Markus","homepage":"http://www.markusproject.org","size":49887,"stargazers_count":125,"watchers_count":125,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":152,"mirror_url":null,"open_issues_count":96,"forks":152,"open_issues":96,"watchers":125,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2168"},"html":{"href":"https://github.com/MarkUsProject/Markus/pull/2168"},"issue":{"href":"https://api.github.com/repos/MarkUsProject/Markus/issues/2168"},"comments":{"href":"https://api.github.com/repos/MarkUsProject/Markus/issues/2168/comments"},"review_comments":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2168/comments"},"review_comment":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MarkUsProject/Markus/pulls/2168/commits"},"statuses":{"href":"https://api.github.com/repos/MarkUsProject/Markus/statuses/03d1b35201123baddd3dfe53434316465d5368f5"}}}}