{"action":"created","comment":{"url":"https://api.github.com/repos/berrange/gerrymander/pulls/comments/53149631","id":53149631,"diff_hunk":"@@ -0,0 +1,53 @@\n+#\n+# Copyright (C) 2014 Red Hat, Inc\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n+# not use this file except in compliance with the License. You may obtain\n+# a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+# License for the specific language governing permissions and limitations\n+# under the License.\n+\n+import subprocess\n+import urlparse","path":"gerrymander/git.py","position":17,"original_position":17,"commit_id":"1cb67b2fec282a1ea892b755df35747b7ecec425","original_commit_id":"1cb67b2fec282a1ea892b755df35747b7ecec425","user":{"login":"berrange","id":1517315,"avatar_url":"https://avatars.githubusercontent.com/u/1517315?v=3","gravatar_id":"","url":"https://api.github.com/users/berrange","html_url":"https://github.com/berrange","followers_url":"https://api.github.com/users/berrange/followers","following_url":"https://api.github.com/users/berrange/following{/other_user}","gists_url":"https://api.github.com/users/berrange/gists{/gist_id}","starred_url":"https://api.github.com/users/berrange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berrange/subscriptions","organizations_url":"https://api.github.com/users/berrange/orgs","repos_url":"https://api.github.com/users/berrange/repos","events_url":"https://api.github.com/users/berrange/events{/privacy}","received_events_url":"https://api.github.com/users/berrange/received_events","type":"User","site_admin":false},"body":"This needs to also try urllib.parse for Python3 compatibility","created_at":"2016-02-17T11:08:53Z","updated_at":"2016-02-17T11:08:53Z","html_url":"https://github.com/berrange/gerrymander/pull/29#discussion_r53149631","pull_request_url":"https://api.github.com/repos/berrange/gerrymander/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/berrange/gerrymander/pulls/comments/53149631"},"html":{"href":"https://github.com/berrange/gerrymander/pull/29#discussion_r53149631"},"pull_request":{"href":"https://api.github.com/repos/berrange/gerrymander/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/berrange/gerrymander/pulls/29","id":59507176,"html_url":"https://github.com/berrange/gerrymander/pull/29","diff_url":"https://github.com/berrange/gerrymander/pull/29.diff","patch_url":"https://github.com/berrange/gerrymander/pull/29.patch","issue_url":"https://api.github.com/repos/berrange/gerrymander/issues/29","number":29,"state":"open","locked":false,"title":"add support for getting gerrit server from git remote","user":{"login":"larsks","id":82622,"avatar_url":"https://avatars.githubusercontent.com/u/82622?v=3","gravatar_id":"","url":"https://api.github.com/users/larsks","html_url":"https://github.com/larsks","followers_url":"https://api.github.com/users/larsks/followers","following_url":"https://api.github.com/users/larsks/following{/other_user}","gists_url":"https://api.github.com/users/larsks/gists{/gist_id}","starred_url":"https://api.github.com/users/larsks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsks/subscriptions","organizations_url":"https://api.github.com/users/larsks/orgs","repos_url":"https://api.github.com/users/larsks/repos","events_url":"https://api.github.com/users/larsks/events{/privacy}","received_events_url":"https://api.github.com/users/larsks/received_events","type":"User","site_admin":false},"body":"With this change, you can configure your `.gerrymander` file like\nthis:\n\n    [server]\n    remote = gerrit\n\nAnd gerrymander will read the user, host, and port from the named\nremote in whatever git repository you happen to be using at the time.\nThis is especially convenient when your work environment includes\nprojects hosted at multiple gerrit sites.","created_at":"2016-02-16T15:32:56Z","updated_at":"2016-02-17T11:08:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"427d9875dea125df796259f01ffe6e7c957ef1a5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/berrange/gerrymander/pulls/29/commits","review_comments_url":"https://api.github.com/repos/berrange/gerrymander/pulls/29/comments","review_comment_url":"https://api.github.com/repos/berrange/gerrymander/pulls/comments{/number}","comments_url":"https://api.github.com/repos/berrange/gerrymander/issues/29/comments","statuses_url":"https://api.github.com/repos/berrange/gerrymander/statuses/1cb67b2fec282a1ea892b755df35747b7ecec425","head":{"label":"larsks:larsks/config-from-git","ref":"larsks/config-from-git","sha":"1cb67b2fec282a1ea892b755df35747b7ecec425","user":{"login":"larsks","id":82622,"avatar_url":"https://avatars.githubusercontent.com/u/82622?v=3","gravatar_id":"","url":"https://api.github.com/users/larsks","html_url":"https://github.com/larsks","followers_url":"https://api.github.com/users/larsks/followers","following_url":"https://api.github.com/users/larsks/following{/other_user}","gists_url":"https://api.github.com/users/larsks/gists{/gist_id}","starred_url":"https://api.github.com/users/larsks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsks/subscriptions","organizations_url":"https://api.github.com/users/larsks/orgs","repos_url":"https://api.github.com/users/larsks/repos","events_url":"https://api.github.com/users/larsks/events{/privacy}","received_events_url":"https://api.github.com/users/larsks/received_events","type":"User","site_admin":false},"repo":{"id":51846522,"name":"gerrymander","full_name":"larsks/gerrymander","owner":{"login":"larsks","id":82622,"avatar_url":"https://avatars.githubusercontent.com/u/82622?v=3","gravatar_id":"","url":"https://api.github.com/users/larsks","html_url":"https://github.com/larsks","followers_url":"https://api.github.com/users/larsks/followers","following_url":"https://api.github.com/users/larsks/following{/other_user}","gists_url":"https://api.github.com/users/larsks/gists{/gist_id}","starred_url":"https://api.github.com/users/larsks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsks/subscriptions","organizations_url":"https://api.github.com/users/larsks/orgs","repos_url":"https://api.github.com/users/larsks/repos","events_url":"https://api.github.com/users/larsks/events{/privacy}","received_events_url":"https://api.github.com/users/larsks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/larsks/gerrymander","description":"Gerrymander provides a client for interacting with & querying the Gerrit code review system","fork":true,"url":"https://api.github.com/repos/larsks/gerrymander","forks_url":"https://api.github.com/repos/larsks/gerrymander/forks","keys_url":"https://api.github.com/repos/larsks/gerrymander/keys{/key_id}","collaborators_url":"https://api.github.com/repos/larsks/gerrymander/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/larsks/gerrymander/teams","hooks_url":"https://api.github.com/repos/larsks/gerrymander/hooks","issue_events_url":"https://api.github.com/repos/larsks/gerrymander/issues/events{/number}","events_url":"https://api.github.com/repos/larsks/gerrymander/events","assignees_url":"https://api.github.com/repos/larsks/gerrymander/assignees{/user}","branches_url":"https://api.github.com/repos/larsks/gerrymander/branches{/branch}","tags_url":"https://api.github.com/repos/larsks/gerrymander/tags","blobs_url":"https://api.github.com/repos/larsks/gerrymander/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/larsks/gerrymander/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/larsks/gerrymander/git/refs{/sha}","trees_url":"https://api.github.com/repos/larsks/gerrymander/git/trees{/sha}","statuses_url":"https://api.github.com/repos/larsks/gerrymander/statuses/{sha}","languages_url":"https://api.github.com/repos/larsks/gerrymander/languages","stargazers_url":"https://api.github.com/repos/larsks/gerrymander/stargazers","contributors_url":"https://api.github.com/repos/larsks/gerrymander/contributors","subscribers_url":"https://api.github.com/repos/larsks/gerrymander/subscribers","subscription_url":"https://api.github.com/repos/larsks/gerrymander/subscription","commits_url":"https://api.github.com/repos/larsks/gerrymander/commits{/sha}","git_commits_url":"https://api.github.com/repos/larsks/gerrymander/git/commits{/sha}","comments_url":"https://api.github.com/repos/larsks/gerrymander/comments{/number}","issue_comment_url":"https://api.github.com/repos/larsks/gerrymander/issues/comments{/number}","contents_url":"https://api.github.com/repos/larsks/gerrymander/contents/{+path}","compare_url":"https://api.github.com/repos/larsks/gerrymander/compare/{base}...{head}","merges_url":"https://api.github.com/repos/larsks/gerrymander/merges","archive_url":"https://api.github.com/repos/larsks/gerrymander/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/larsks/gerrymander/downloads","issues_url":"https://api.github.com/repos/larsks/gerrymander/issues{/number}","pulls_url":"https://api.github.com/repos/larsks/gerrymander/pulls{/number}","milestones_url":"https://api.github.com/repos/larsks/gerrymander/milestones{/number}","notifications_url":"https://api.github.com/repos/larsks/gerrymander/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/larsks/gerrymander/labels{/name}","releases_url":"https://api.github.com/repos/larsks/gerrymander/releases{/id}","deployments_url":"https://api.github.com/repos/larsks/gerrymander/deployments","created_at":"2016-02-16T15:30:31Z","updated_at":"2016-02-16T15:30:31Z","pushed_at":"2016-02-16T15:32:21Z","git_url":"git://github.com/larsks/gerrymander.git","ssh_url":"git@github.com:larsks/gerrymander.git","clone_url":"https://github.com/larsks/gerrymander.git","svn_url":"https://github.com/larsks/gerrymander","homepage":null,"size":140,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"berrange:master","ref":"master","sha":"472beed7a2701200dfdd531ef4a96cc84241a95b","user":{"login":"berrange","id":1517315,"avatar_url":"https://avatars.githubusercontent.com/u/1517315?v=3","gravatar_id":"","url":"https://api.github.com/users/berrange","html_url":"https://github.com/berrange","followers_url":"https://api.github.com/users/berrange/followers","following_url":"https://api.github.com/users/berrange/following{/other_user}","gists_url":"https://api.github.com/users/berrange/gists{/gist_id}","starred_url":"https://api.github.com/users/berrange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berrange/subscriptions","organizations_url":"https://api.github.com/users/berrange/orgs","repos_url":"https://api.github.com/users/berrange/repos","events_url":"https://api.github.com/users/berrange/events{/privacy}","received_events_url":"https://api.github.com/users/berrange/received_events","type":"User","site_admin":false},"repo":{"id":18675358,"name":"gerrymander","full_name":"berrange/gerrymander","owner":{"login":"berrange","id":1517315,"avatar_url":"https://avatars.githubusercontent.com/u/1517315?v=3","gravatar_id":"","url":"https://api.github.com/users/berrange","html_url":"https://github.com/berrange","followers_url":"https://api.github.com/users/berrange/followers","following_url":"https://api.github.com/users/berrange/following{/other_user}","gists_url":"https://api.github.com/users/berrange/gists{/gist_id}","starred_url":"https://api.github.com/users/berrange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berrange/subscriptions","organizations_url":"https://api.github.com/users/berrange/orgs","repos_url":"https://api.github.com/users/berrange/repos","events_url":"https://api.github.com/users/berrange/events{/privacy}","received_events_url":"https://api.github.com/users/berrange/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/berrange/gerrymander","description":"Gerrymander provides a client for interacting with & querying the Gerrit code review system","fork":false,"url":"https://api.github.com/repos/berrange/gerrymander","forks_url":"https://api.github.com/repos/berrange/gerrymander/forks","keys_url":"https://api.github.com/repos/berrange/gerrymander/keys{/key_id}","collaborators_url":"https://api.github.com/repos/berrange/gerrymander/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/berrange/gerrymander/teams","hooks_url":"https://api.github.com/repos/berrange/gerrymander/hooks","issue_events_url":"https://api.github.com/repos/berrange/gerrymander/issues/events{/number}","events_url":"https://api.github.com/repos/berrange/gerrymander/events","assignees_url":"https://api.github.com/repos/berrange/gerrymander/assignees{/user}","branches_url":"https://api.github.com/repos/berrange/gerrymander/branches{/branch}","tags_url":"https://api.github.com/repos/berrange/gerrymander/tags","blobs_url":"https://api.github.com/repos/berrange/gerrymander/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/berrange/gerrymander/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/berrange/gerrymander/git/refs{/sha}","trees_url":"https://api.github.com/repos/berrange/gerrymander/git/trees{/sha}","statuses_url":"https://api.github.com/repos/berrange/gerrymander/statuses/{sha}","languages_url":"https://api.github.com/repos/berrange/gerrymander/languages","stargazers_url":"https://api.github.com/repos/berrange/gerrymander/stargazers","contributors_url":"https://api.github.com/repos/berrange/gerrymander/contributors","subscribers_url":"https://api.github.com/repos/berrange/gerrymander/subscribers","subscription_url":"https://api.github.com/repos/berrange/gerrymander/subscription","commits_url":"https://api.github.com/repos/berrange/gerrymander/commits{/sha}","git_commits_url":"https://api.github.com/repos/berrange/gerrymander/git/commits{/sha}","comments_url":"https://api.github.com/repos/berrange/gerrymander/comments{/number}","issue_comment_url":"https://api.github.com/repos/berrange/gerrymander/issues/comments{/number}","contents_url":"https://api.github.com/repos/berrange/gerrymander/contents/{+path}","compare_url":"https://api.github.com/repos/berrange/gerrymander/compare/{base}...{head}","merges_url":"https://api.github.com/repos/berrange/gerrymander/merges","archive_url":"https://api.github.com/repos/berrange/gerrymander/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/berrange/gerrymander/downloads","issues_url":"https://api.github.com/repos/berrange/gerrymander/issues{/number}","pulls_url":"https://api.github.com/repos/berrange/gerrymander/pulls{/number}","milestones_url":"https://api.github.com/repos/berrange/gerrymander/milestones{/number}","notifications_url":"https://api.github.com/repos/berrange/gerrymander/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/berrange/gerrymander/labels{/name}","releases_url":"https://api.github.com/repos/berrange/gerrymander/releases{/id}","deployments_url":"https://api.github.com/repos/berrange/gerrymander/deployments","created_at":"2014-04-11T13:39:01Z","updated_at":"2016-02-16T13:28:52Z","pushed_at":"2016-02-17T10:50:59Z","git_url":"git://github.com/berrange/gerrymander.git","ssh_url":"git@github.com:berrange/gerrymander.git","clone_url":"https://github.com/berrange/gerrymander.git","svn_url":"https://github.com/berrange/gerrymander","homepage":null,"size":170,"stargazers_count":27,"watchers_count":27,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":8,"forks":13,"open_issues":8,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/berrange/gerrymander/pulls/29"},"html":{"href":"https://github.com/berrange/gerrymander/pull/29"},"issue":{"href":"https://api.github.com/repos/berrange/gerrymander/issues/29"},"comments":{"href":"https://api.github.com/repos/berrange/gerrymander/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/berrange/gerrymander/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/berrange/gerrymander/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/berrange/gerrymander/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/berrange/gerrymander/statuses/1cb67b2fec282a1ea892b755df35747b7ecec425"}}}}