{"action":"created","comment":{"url":"https://api.github.com/repos/stellar/stellar_core_commander/pulls/comments/33849036","id":33849036,"diff_hunk":"@@ -206,18 +206,44 @@ def shared_history_volume\n     end\n \n     Contract None => String\n-    def history_commands\n-      if use_s3\n-        <<-EOS.strip_heredoc\n-          HISTORY_GET=aws s3 --region #{@s3_history_region} cp #{@s3_history_prefix}/%s/{0} {1}\n-          HISTORY_PUT=aws s3 --region #{@s3_history_region} cp {0} #{@s3_history_prefix}/%s/{1}\n-        EOS\n+    def history_get_command\n+      cmds = {}\n+      @quorum.each do |q|\n+        if q == @name\n+          next\n+        end\n+        cmd = \"\"\n+        if SPECIAL_PEERS.has_key? q\n+          cmd = SPECIAL_PEERS[q][:get]\n+        elsif use_s3\n+          cmd = \"aws s3 --region #{@s3_history_region} cp #{@s3_history_prefix}/%s/{0} {1}\"\n+        else\n+          cmd = \"cp /history/%s/{0} {1}\"\n+        end\n+        cmds[cmd] = ()\n+      end\n+      if cmds.size != 1\n+        raise \"Conflicting get commands: #{cmds.keys}\"\n+      end\n+      <<-EOS.strip_heredoc\n+        HISTORY_GET=#{cmds.keys.first}\n+      EOS\n+    end\n+\n+    Contract None => String\n+    def history_put_commands\n+      if @quorum.any? {|q| SPECIAL_PEERS.has_key? q}\n+        \"\"","path":"lib/stellar_core_commander/docker_process.rb","position":37,"original_position":37,"commit_id":"df5891ca2c98229e250b5eae8e83933e346bebd9","original_commit_id":"df5891ca2c98229e250b5eae8e83933e346bebd9","user":{"login":"matschaffer","id":690,"avatar_url":"https://avatars.githubusercontent.com/u/690?v=3","gravatar_id":"","url":"https://api.github.com/users/matschaffer","html_url":"https://github.com/matschaffer","followers_url":"https://api.github.com/users/matschaffer/followers","following_url":"https://api.github.com/users/matschaffer/following{/other_user}","gists_url":"https://api.github.com/users/matschaffer/gists{/gist_id}","starred_url":"https://api.github.com/users/matschaffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matschaffer/subscriptions","organizations_url":"https://api.github.com/users/matschaffer/orgs","repos_url":"https://api.github.com/users/matschaffer/repos","events_url":"https://api.github.com/users/matschaffer/events{/privacy}","received_events_url":"https://api.github.com/users/matschaffer/received_events","type":"User","site_admin":false},"body":":+1: to that then. Makes me wonder if some of the confd stuff might need rethinking.","created_at":"2015-07-03T08:50:35Z","updated_at":"2015-07-03T08:50:35Z","html_url":"https://github.com/stellar/stellar_core_commander/pull/36#discussion_r33849036","pull_request_url":"https://api.github.com/repos/stellar/stellar_core_commander/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/stellar/stellar_core_commander/pulls/comments/33849036"},"html":{"href":"https://github.com/stellar/stellar_core_commander/pull/36#discussion_r33849036"},"pull_request":{"href":"https://api.github.com/repos/stellar/stellar_core_commander/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/stellar/stellar_core_commander/pulls/36","id":39137959,"html_url":"https://github.com/stellar/stellar_core_commander/pull/36","diff_url":"https://github.com/stellar/stellar_core_commander/pull/36.diff","patch_url":"https://github.com/stellar/stellar_core_commander/pull/36.patch","issue_url":"https://api.github.com/repos/stellar/stellar_core_commander/issues/36","number":36,"state":"open","locked":false,"title":"Add catchup-to-testnet code and test","user":{"login":"graydon","id":14097,"avatar_url":"https://avatars.githubusercontent.com/u/14097?v=3","gravatar_id":"","url":"https://api.github.com/users/graydon","html_url":"https://github.com/graydon","followers_url":"https://api.github.com/users/graydon/followers","following_url":"https://api.github.com/users/graydon/following{/other_user}","gists_url":"https://api.github.com/users/graydon/gists{/gist_id}","starred_url":"https://api.github.com/users/graydon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graydon/subscriptions","organizations_url":"https://api.github.com/users/graydon/orgs","repos_url":"https://api.github.com/users/graydon/repos","events_url":"https://api.github.com/users/graydon/events{/privacy}","received_events_url":"https://api.github.com/users/graydon/received_events","type":"User","site_admin":false},"body":"This hard-wires `:testnet1`, `:testnet2` and `:testnet3` as magic node names that redirect scc to talk to the testnet. Adds a test that uses it. Only half-tested since testnet is running non-master code presently.","created_at":"2015-07-03T00:33:43Z","updated_at":"2015-07-03T08:50:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1cfb02bf19e913921e722b39b7032af4590bd59c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stellar/stellar_core_commander/pulls/36/commits","review_comments_url":"https://api.github.com/repos/stellar/stellar_core_commander/pulls/36/comments","review_comment_url":"https://api.github.com/repos/stellar/stellar_core_commander/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stellar/stellar_core_commander/issues/36/comments","statuses_url":"https://api.github.com/repos/stellar/stellar_core_commander/statuses/df5891ca2c98229e250b5eae8e83933e346bebd9","head":{"label":"graydon:catchup-to-testnet","ref":"catchup-to-testnet","sha":"df5891ca2c98229e250b5eae8e83933e346bebd9","user":{"login":"graydon","id":14097,"avatar_url":"https://avatars.githubusercontent.com/u/14097?v=3","gravatar_id":"","url":"https://api.github.com/users/graydon","html_url":"https://github.com/graydon","followers_url":"https://api.github.com/users/graydon/followers","following_url":"https://api.github.com/users/graydon/following{/other_user}","gists_url":"https://api.github.com/users/graydon/gists{/gist_id}","starred_url":"https://api.github.com/users/graydon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graydon/subscriptions","organizations_url":"https://api.github.com/users/graydon/orgs","repos_url":"https://api.github.com/users/graydon/repos","events_url":"https://api.github.com/users/graydon/events{/privacy}","received_events_url":"https://api.github.com/users/graydon/received_events","type":"User","site_admin":false},"repo":{"id":36400800,"name":"stellar_core_commander","full_name":"graydon/stellar_core_commander","owner":{"login":"graydon","id":14097,"avatar_url":"https://avatars.githubusercontent.com/u/14097?v=3","gravatar_id":"","url":"https://api.github.com/users/graydon","html_url":"https://github.com/graydon","followers_url":"https://api.github.com/users/graydon/followers","following_url":"https://api.github.com/users/graydon/following{/other_user}","gists_url":"https://api.github.com/users/graydon/gists{/gist_id}","starred_url":"https://api.github.com/users/graydon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graydon/subscriptions","organizations_url":"https://api.github.com/users/graydon/orgs","repos_url":"https://api.github.com/users/graydon/repos","events_url":"https://api.github.com/users/graydon/events{/privacy}","received_events_url":"https://api.github.com/users/graydon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/graydon/stellar_core_commander","description":"A system of creating isolated Stellar test networks into which you can play transactions and record results.","fork":true,"url":"https://api.github.com/repos/graydon/stellar_core_commander","forks_url":"https://api.github.com/repos/graydon/stellar_core_commander/forks","keys_url":"https://api.github.com/repos/graydon/stellar_core_commander/keys{/key_id}","collaborators_url":"https://api.github.com/repos/graydon/stellar_core_commander/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/graydon/stellar_core_commander/teams","hooks_url":"https://api.github.com/repos/graydon/stellar_core_commander/hooks","issue_events_url":"https://api.github.com/repos/graydon/stellar_core_commander/issues/events{/number}","events_url":"https://api.github.com/repos/graydon/stellar_core_commander/events","assignees_url":"https://api.github.com/repos/graydon/stellar_core_commander/assignees{/user}","branches_url":"https://api.github.com/repos/graydon/stellar_core_commander/branches{/branch}","tags_url":"https://api.github.com/repos/graydon/stellar_core_commander/tags","blobs_url":"https://api.github.com/repos/graydon/stellar_core_commander/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/graydon/stellar_core_commander/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/graydon/stellar_core_commander/git/refs{/sha}","trees_url":"https://api.github.com/repos/graydon/stellar_core_commander/git/trees{/sha}","statuses_url":"https://api.github.com/repos/graydon/stellar_core_commander/statuses/{sha}","languages_url":"https://api.github.com/repos/graydon/stellar_core_commander/languages","stargazers_url":"https://api.github.com/repos/graydon/stellar_core_commander/stargazers","contributors_url":"https://api.github.com/repos/graydon/stellar_core_commander/contributors","subscribers_url":"https://api.github.com/repos/graydon/stellar_core_commander/subscribers","subscription_url":"https://api.github.com/repos/graydon/stellar_core_commander/subscription","commits_url":"https://api.github.com/repos/graydon/stellar_core_commander/commits{/sha}","git_commits_url":"https://api.github.com/repos/graydon/stellar_core_commander/git/commits{/sha}","comments_url":"https://api.github.com/repos/graydon/stellar_core_commander/comments{/number}","issue_comment_url":"https://api.github.com/repos/graydon/stellar_core_commander/issues/comments{/number}","contents_url":"https://api.github.com/repos/graydon/stellar_core_commander/contents/{+path}","compare_url":"https://api.github.com/repos/graydon/stellar_core_commander/compare/{base}...{head}","merges_url":"https://api.github.com/repos/graydon/stellar_core_commander/merges","archive_url":"https://api.github.com/repos/graydon/stellar_core_commander/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/graydon/stellar_core_commander/downloads","issues_url":"https://api.github.com/repos/graydon/stellar_core_commander/issues{/number}","pulls_url":"https://api.github.com/repos/graydon/stellar_core_commander/pulls{/number}","milestones_url":"https://api.github.com/repos/graydon/stellar_core_commander/milestones{/number}","notifications_url":"https://api.github.com/repos/graydon/stellar_core_commander/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/graydon/stellar_core_commander/labels{/name}","releases_url":"https://api.github.com/repos/graydon/stellar_core_commander/releases{/id}","created_at":"2015-05-27T22:55:56Z","updated_at":"2015-05-27T22:55:56Z","pushed_at":"2015-07-03T00:32:21Z","git_url":"git://github.com/graydon/stellar_core_commander.git","ssh_url":"git@github.com:graydon/stellar_core_commander.git","clone_url":"https://github.com/graydon/stellar_core_commander.git","svn_url":"https://github.com/graydon/stellar_core_commander","homepage":"","size":273,"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":"stellar:master","ref":"master","sha":"29ffb31b962c0b97e16d99cd02be65f7e9b2aeb3","user":{"login":"stellar","id":7386716,"avatar_url":"https://avatars.githubusercontent.com/u/7386716?v=3","gravatar_id":"","url":"https://api.github.com/users/stellar","html_url":"https://github.com/stellar","followers_url":"https://api.github.com/users/stellar/followers","following_url":"https://api.github.com/users/stellar/following{/other_user}","gists_url":"https://api.github.com/users/stellar/gists{/gist_id}","starred_url":"https://api.github.com/users/stellar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stellar/subscriptions","organizations_url":"https://api.github.com/users/stellar/orgs","repos_url":"https://api.github.com/users/stellar/repos","events_url":"https://api.github.com/users/stellar/events{/privacy}","received_events_url":"https://api.github.com/users/stellar/received_events","type":"Organization","site_admin":false},"repo":{"id":34669831,"name":"stellar_core_commander","full_name":"stellar/stellar_core_commander","owner":{"login":"stellar","id":7386716,"avatar_url":"https://avatars.githubusercontent.com/u/7386716?v=3","gravatar_id":"","url":"https://api.github.com/users/stellar","html_url":"https://github.com/stellar","followers_url":"https://api.github.com/users/stellar/followers","following_url":"https://api.github.com/users/stellar/following{/other_user}","gists_url":"https://api.github.com/users/stellar/gists{/gist_id}","starred_url":"https://api.github.com/users/stellar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stellar/subscriptions","organizations_url":"https://api.github.com/users/stellar/orgs","repos_url":"https://api.github.com/users/stellar/repos","events_url":"https://api.github.com/users/stellar/events{/privacy}","received_events_url":"https://api.github.com/users/stellar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stellar/stellar_core_commander","description":"A system of creating isolated Stellar test networks into which you can play transactions and record results.","fork":false,"url":"https://api.github.com/repos/stellar/stellar_core_commander","forks_url":"https://api.github.com/repos/stellar/stellar_core_commander/forks","keys_url":"https://api.github.com/repos/stellar/stellar_core_commander/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stellar/stellar_core_commander/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stellar/stellar_core_commander/teams","hooks_url":"https://api.github.com/repos/stellar/stellar_core_commander/hooks","issue_events_url":"https://api.github.com/repos/stellar/stellar_core_commander/issues/events{/number}","events_url":"https://api.github.com/repos/stellar/stellar_core_commander/events","assignees_url":"https://api.github.com/repos/stellar/stellar_core_commander/assignees{/user}","branches_url":"https://api.github.com/repos/stellar/stellar_core_commander/branches{/branch}","tags_url":"https://api.github.com/repos/stellar/stellar_core_commander/tags","blobs_url":"https://api.github.com/repos/stellar/stellar_core_commander/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stellar/stellar_core_commander/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stellar/stellar_core_commander/git/refs{/sha}","trees_url":"https://api.github.com/repos/stellar/stellar_core_commander/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stellar/stellar_core_commander/statuses/{sha}","languages_url":"https://api.github.com/repos/stellar/stellar_core_commander/languages","stargazers_url":"https://api.github.com/repos/stellar/stellar_core_commander/stargazers","contributors_url":"https://api.github.com/repos/stellar/stellar_core_commander/contributors","subscribers_url":"https://api.github.com/repos/stellar/stellar_core_commander/subscribers","subscription_url":"https://api.github.com/repos/stellar/stellar_core_commander/subscription","commits_url":"https://api.github.com/repos/stellar/stellar_core_commander/commits{/sha}","git_commits_url":"https://api.github.com/repos/stellar/stellar_core_commander/git/commits{/sha}","comments_url":"https://api.github.com/repos/stellar/stellar_core_commander/comments{/number}","issue_comment_url":"https://api.github.com/repos/stellar/stellar_core_commander/issues/comments{/number}","contents_url":"https://api.github.com/repos/stellar/stellar_core_commander/contents/{+path}","compare_url":"https://api.github.com/repos/stellar/stellar_core_commander/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stellar/stellar_core_commander/merges","archive_url":"https://api.github.com/repos/stellar/stellar_core_commander/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stellar/stellar_core_commander/downloads","issues_url":"https://api.github.com/repos/stellar/stellar_core_commander/issues{/number}","pulls_url":"https://api.github.com/repos/stellar/stellar_core_commander/pulls{/number}","milestones_url":"https://api.github.com/repos/stellar/stellar_core_commander/milestones{/number}","notifications_url":"https://api.github.com/repos/stellar/stellar_core_commander/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stellar/stellar_core_commander/labels{/name}","releases_url":"https://api.github.com/repos/stellar/stellar_core_commander/releases{/id}","created_at":"2015-04-27T13:57:27Z","updated_at":"2015-07-03T01:48:03Z","pushed_at":"2015-07-03T00:33:44Z","git_url":"git://github.com/stellar/stellar_core_commander.git","ssh_url":"git@github.com:stellar/stellar_core_commander.git","clone_url":"https://github.com/stellar/stellar_core_commander.git","svn_url":"https://github.com/stellar/stellar_core_commander","homepage":"","size":666,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stellar/stellar_core_commander/pulls/36"},"html":{"href":"https://github.com/stellar/stellar_core_commander/pull/36"},"issue":{"href":"https://api.github.com/repos/stellar/stellar_core_commander/issues/36"},"comments":{"href":"https://api.github.com/repos/stellar/stellar_core_commander/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/stellar/stellar_core_commander/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/stellar/stellar_core_commander/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stellar/stellar_core_commander/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/stellar/stellar_core_commander/statuses/df5891ca2c98229e250b5eae8e83933e346bebd9"}}}}