{"action":"created","comment":{"url":"https://api.github.com/repos/numenta/numenta-apps/pulls/comments/37010247","id":37010247,"diff_hunk":"@@ -190,135 +209,164 @@ def setRemoteURL(remote, url, path, logger):\n                           logger=logger)\n \n \n-def clone(gitURL, **kwargs):\n+def clone(gitURL, logger, **kwargs):\n   \"\"\"\n   Clones the given git repository\n \n-  @param gitURL: The repository URL.\n-  @param kwargs: Various options to git clone gitURL can be passed as keyword\n+  :param gitURL: The repository URL.\n+\n+  :param logger: logger for additional debug info if desired\n+\n+  :param kwargs: Various options to git clone gitURL can be passed as keyword\n     arguments. For now only directory option is handled.\n   e.g.\n   clone(gitURL, directory=nameOfDirectory)\n \n-  @raises\n+  :raises:\n     infrastructure.utilities.exceptions.CommandFailedError: if\n     the command fails\n \n-  @returns: The blob output of git clone\n-  @rtype: string\n+  :returns: The blob output of git clone\n+\n+  :rtype: string\n   \"\"\"\n-  command = \"git clone %s\" % gitURL\n+  command = [\"git\", \"clone\", gitURL]\n   if checkIfOptionSet(\"directory\", **kwargs):\n-    command += \" \" + kwargs[\"directory\"]\n-  return executeCommand(command)\n+    command.append(kwargs[\"directory\"])\n+  return executeCommand(command=command, logger=logger)\n \n \n \n-def checkout(pathspec, **kwargs):\n+def checkout(pathspec, logger, **kwargs):\n   \"\"\"\n   Switches to a given commit-ish\n \n-  @param pathspec: The name of the branch (commit-ish)\n+  :param pathspec: The name of the branch (commit-ish)\n+\n+  :param logger: logger for additional debug info if desired\n \n-  @param kwargs:\n+  :param kwargs:\n \n-  @raises\n+  :raises:\n     infrastructure.utilities.exceptions.CommandFailedError: if\n     the command fails\n \n-  @returns: The text blob output of git checkout\n-  @rtype: string\n+  :returns: The text blob output of git checkout\n+\n+  :rtype: string\n   \"\"\"\n-  command = \"git checkout\"\n+  command = [\"git\", \"checkout\"]\n   if checkIfOptionSet(\"new\", **kwargs):\n-    command += \" -b \"\n+    command.append(\"-b\")\n   elif checkIfOptionSet(\"orphan\", **kwargs):\n-    command += \" --orphan\"\n+    command.append(\"--orphan\")\n   elif checkIfOptionSet(\"theirs\", **kwargs):\n-    command += \" --theirs\"\n+    command.append(\"--theirs\")\n \n-  command += \" %s\" % pathspec\n-  return executeCommand(command)\n+  command.append(pathspec)\n+  return executeCommand(command=command, logger=logger)\n \n \n \n-def checkoutNewBranch(pathspec):\n+def checkoutNewBranch(pathspec, logger):\n   \"\"\"\n   Convenience function to create and switch to a new branch.\n \n-  @param pathspec: Name of the branch to be checked out.\n+  :param pathspec: Name of the branch to be checked out.\n \n-  @raises\n+  :param logger: logger for additional debug info if desired\n+\n+  :raises:\n     infrastructure.utilities.exceptions.CommandFailedError: if\n     the command fails\n+\n+  :returns: The text blob output of git checkout\n+\n+  :rtype: string\n   \"\"\"\n-  return checkout(pathspec, new=True)\n+  return checkout(pathspec=pathspec, new=True, logger=logger)","path":"infrastructure/infrastructure/utilities/git.py","position":275,"original_position":275,"commit_id":"ba508069d00a9c577be856f3a75a8d92b07b7299","original_commit_id":"ba508069d00a9c577be856f3a75a8d92b07b7299","user":{"login":"unixorn","id":23920,"avatar_url":"https://avatars.githubusercontent.com/u/23920?v=3","gravatar_id":"","url":"https://api.github.com/users/unixorn","html_url":"https://github.com/unixorn","followers_url":"https://api.github.com/users/unixorn/followers","following_url":"https://api.github.com/users/unixorn/following{/other_user}","gists_url":"https://api.github.com/users/unixorn/gists{/gist_id}","starred_url":"https://api.github.com/users/unixorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unixorn/subscriptions","organizations_url":"https://api.github.com/users/unixorn/orgs","repos_url":"https://api.github.com/users/unixorn/repos","events_url":"https://api.github.com/users/unixorn/events{/privacy}","received_events_url":"https://api.github.com/users/unixorn/received_events","type":"User","site_admin":false},"body":"+1 for abandoning **kwargs throughout. They're a pita to understand what keys are valid.","created_at":"2015-08-13T18:43:37Z","updated_at":"2015-08-13T18:43:37Z","html_url":"https://github.com/numenta/numenta-apps/pull/199#discussion_r37010247","pull_request_url":"https://api.github.com/repos/numenta/numenta-apps/pulls/199","_links":{"self":{"href":"https://api.github.com/repos/numenta/numenta-apps/pulls/comments/37010247"},"html":{"href":"https://github.com/numenta/numenta-apps/pull/199#discussion_r37010247"},"pull_request":{"href":"https://api.github.com/repos/numenta/numenta-apps/pulls/199"}}},"pull_request":{"url":"https://api.github.com/repos/numenta/numenta-apps/pulls/199","id":42123918,"html_url":"https://github.com/numenta/numenta-apps/pull/199","diff_url":"https://github.com/numenta/numenta-apps/pull/199.diff","patch_url":"https://github.com/numenta/numenta-apps/pull/199.patch","issue_url":"https://api.github.com/repos/numenta/numenta-apps/issues/199","number":199,"state":"open","locked":false,"title":"Cleanup git.py","user":{"login":"shantanoo","id":853,"avatar_url":"https://avatars.githubusercontent.com/u/853?v=3","gravatar_id":"","url":"https://api.github.com/users/shantanoo","html_url":"https://github.com/shantanoo","followers_url":"https://api.github.com/users/shantanoo/followers","following_url":"https://api.github.com/users/shantanoo/following{/other_user}","gists_url":"https://api.github.com/users/shantanoo/gists{/gist_id}","starred_url":"https://api.github.com/users/shantanoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shantanoo/subscriptions","organizations_url":"https://api.github.com/users/shantanoo/orgs","repos_url":"https://api.github.com/users/shantanoo/repos","events_url":"https://api.github.com/users/shantanoo/events{/privacy}","received_events_url":"https://api.github.com/users/shantanoo/received_events","type":"User","site_admin":false},"body":"Cc: @jcasner , @unixorn, @vitaly-krugl  ","created_at":"2015-08-11T12:38:39Z","updated_at":"2015-08-13T18:43:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f623caa684a8248c958b283d65817edcf22bc0e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/numenta/numenta-apps/pulls/199/commits","review_comments_url":"https://api.github.com/repos/numenta/numenta-apps/pulls/199/comments","review_comment_url":"https://api.github.com/repos/numenta/numenta-apps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/numenta/numenta-apps/issues/199/comments","statuses_url":"https://api.github.com/repos/numenta/numenta-apps/statuses/ba508069d00a9c577be856f3a75a8d92b07b7299","head":{"label":"shantanoo:feature/TAUR-1369-cleanup-git-py","ref":"feature/TAUR-1369-cleanup-git-py","sha":"ba508069d00a9c577be856f3a75a8d92b07b7299","user":{"login":"shantanoo","id":853,"avatar_url":"https://avatars.githubusercontent.com/u/853?v=3","gravatar_id":"","url":"https://api.github.com/users/shantanoo","html_url":"https://github.com/shantanoo","followers_url":"https://api.github.com/users/shantanoo/followers","following_url":"https://api.github.com/users/shantanoo/following{/other_user}","gists_url":"https://api.github.com/users/shantanoo/gists{/gist_id}","starred_url":"https://api.github.com/users/shantanoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shantanoo/subscriptions","organizations_url":"https://api.github.com/users/shantanoo/orgs","repos_url":"https://api.github.com/users/shantanoo/repos","events_url":"https://api.github.com/users/shantanoo/events{/privacy}","received_events_url":"https://api.github.com/users/shantanoo/received_events","type":"User","site_admin":false},"repo":{"id":36969916,"name":"numenta-apps","full_name":"shantanoo/numenta-apps","owner":{"login":"shantanoo","id":853,"avatar_url":"https://avatars.githubusercontent.com/u/853?v=3","gravatar_id":"","url":"https://api.github.com/users/shantanoo","html_url":"https://github.com/shantanoo","followers_url":"https://api.github.com/users/shantanoo/followers","following_url":"https://api.github.com/users/shantanoo/following{/other_user}","gists_url":"https://api.github.com/users/shantanoo/gists{/gist_id}","starred_url":"https://api.github.com/users/shantanoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shantanoo/subscriptions","organizations_url":"https://api.github.com/users/shantanoo/orgs","repos_url":"https://api.github.com/users/shantanoo/repos","events_url":"https://api.github.com/users/shantanoo/events{/privacy}","received_events_url":"https://api.github.com/users/shantanoo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shantanoo/numenta-apps","description":"HTM based applications and support libraries. Includes Grok for IT Analytics and Grok for Stocks.","fork":true,"url":"https://api.github.com/repos/shantanoo/numenta-apps","forks_url":"https://api.github.com/repos/shantanoo/numenta-apps/forks","keys_url":"https://api.github.com/repos/shantanoo/numenta-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shantanoo/numenta-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shantanoo/numenta-apps/teams","hooks_url":"https://api.github.com/repos/shantanoo/numenta-apps/hooks","issue_events_url":"https://api.github.com/repos/shantanoo/numenta-apps/issues/events{/number}","events_url":"https://api.github.com/repos/shantanoo/numenta-apps/events","assignees_url":"https://api.github.com/repos/shantanoo/numenta-apps/assignees{/user}","branches_url":"https://api.github.com/repos/shantanoo/numenta-apps/branches{/branch}","tags_url":"https://api.github.com/repos/shantanoo/numenta-apps/tags","blobs_url":"https://api.github.com/repos/shantanoo/numenta-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shantanoo/numenta-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shantanoo/numenta-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/shantanoo/numenta-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shantanoo/numenta-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/shantanoo/numenta-apps/languages","stargazers_url":"https://api.github.com/repos/shantanoo/numenta-apps/stargazers","contributors_url":"https://api.github.com/repos/shantanoo/numenta-apps/contributors","subscribers_url":"https://api.github.com/repos/shantanoo/numenta-apps/subscribers","subscription_url":"https://api.github.com/repos/shantanoo/numenta-apps/subscription","commits_url":"https://api.github.com/repos/shantanoo/numenta-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/shantanoo/numenta-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/shantanoo/numenta-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/shantanoo/numenta-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/shantanoo/numenta-apps/contents/{+path}","compare_url":"https://api.github.com/repos/shantanoo/numenta-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shantanoo/numenta-apps/merges","archive_url":"https://api.github.com/repos/shantanoo/numenta-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shantanoo/numenta-apps/downloads","issues_url":"https://api.github.com/repos/shantanoo/numenta-apps/issues{/number}","pulls_url":"https://api.github.com/repos/shantanoo/numenta-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/shantanoo/numenta-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/shantanoo/numenta-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shantanoo/numenta-apps/labels{/name}","releases_url":"https://api.github.com/repos/shantanoo/numenta-apps/releases{/id}","created_at":"2015-06-06T06:25:04Z","updated_at":"2015-06-06T06:25:08Z","pushed_at":"2015-08-13T12:57:21Z","git_url":"git://github.com/shantanoo/numenta-apps.git","ssh_url":"git@github.com:shantanoo/numenta-apps.git","clone_url":"https://github.com/shantanoo/numenta-apps.git","svn_url":"https://github.com/shantanoo/numenta-apps","homepage":"http://numenta.com","size":44353,"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":"numenta:master","ref":"master","sha":"c5942a806115cca7515584f574dac24dfcf77a4a","user":{"login":"numenta","id":1039191,"avatar_url":"https://avatars.githubusercontent.com/u/1039191?v=3","gravatar_id":"","url":"https://api.github.com/users/numenta","html_url":"https://github.com/numenta","followers_url":"https://api.github.com/users/numenta/followers","following_url":"https://api.github.com/users/numenta/following{/other_user}","gists_url":"https://api.github.com/users/numenta/gists{/gist_id}","starred_url":"https://api.github.com/users/numenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numenta/subscriptions","organizations_url":"https://api.github.com/users/numenta/orgs","repos_url":"https://api.github.com/users/numenta/repos","events_url":"https://api.github.com/users/numenta/events{/privacy}","received_events_url":"https://api.github.com/users/numenta/received_events","type":"Organization","site_admin":false},"repo":{"id":36754402,"name":"numenta-apps","full_name":"numenta/numenta-apps","owner":{"login":"numenta","id":1039191,"avatar_url":"https://avatars.githubusercontent.com/u/1039191?v=3","gravatar_id":"","url":"https://api.github.com/users/numenta","html_url":"https://github.com/numenta","followers_url":"https://api.github.com/users/numenta/followers","following_url":"https://api.github.com/users/numenta/following{/other_user}","gists_url":"https://api.github.com/users/numenta/gists{/gist_id}","starred_url":"https://api.github.com/users/numenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numenta/subscriptions","organizations_url":"https://api.github.com/users/numenta/orgs","repos_url":"https://api.github.com/users/numenta/repos","events_url":"https://api.github.com/users/numenta/events{/privacy}","received_events_url":"https://api.github.com/users/numenta/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/numenta/numenta-apps","description":"HTM based applications and support libraries. Includes Grok for IT Analytics and Grok for Stocks (code name \"Taurus\").","fork":false,"url":"https://api.github.com/repos/numenta/numenta-apps","forks_url":"https://api.github.com/repos/numenta/numenta-apps/forks","keys_url":"https://api.github.com/repos/numenta/numenta-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/numenta/numenta-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/numenta/numenta-apps/teams","hooks_url":"https://api.github.com/repos/numenta/numenta-apps/hooks","issue_events_url":"https://api.github.com/repos/numenta/numenta-apps/issues/events{/number}","events_url":"https://api.github.com/repos/numenta/numenta-apps/events","assignees_url":"https://api.github.com/repos/numenta/numenta-apps/assignees{/user}","branches_url":"https://api.github.com/repos/numenta/numenta-apps/branches{/branch}","tags_url":"https://api.github.com/repos/numenta/numenta-apps/tags","blobs_url":"https://api.github.com/repos/numenta/numenta-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/numenta/numenta-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/numenta/numenta-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/numenta/numenta-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/numenta/numenta-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/numenta/numenta-apps/languages","stargazers_url":"https://api.github.com/repos/numenta/numenta-apps/stargazers","contributors_url":"https://api.github.com/repos/numenta/numenta-apps/contributors","subscribers_url":"https://api.github.com/repos/numenta/numenta-apps/subscribers","subscription_url":"https://api.github.com/repos/numenta/numenta-apps/subscription","commits_url":"https://api.github.com/repos/numenta/numenta-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/numenta/numenta-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/numenta/numenta-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/numenta/numenta-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/numenta/numenta-apps/contents/{+path}","compare_url":"https://api.github.com/repos/numenta/numenta-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/numenta/numenta-apps/merges","archive_url":"https://api.github.com/repos/numenta/numenta-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/numenta/numenta-apps/downloads","issues_url":"https://api.github.com/repos/numenta/numenta-apps/issues{/number}","pulls_url":"https://api.github.com/repos/numenta/numenta-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/numenta/numenta-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/numenta/numenta-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/numenta/numenta-apps/labels{/name}","releases_url":"https://api.github.com/repos/numenta/numenta-apps/releases{/id}","created_at":"2015-06-02T18:49:30Z","updated_at":"2015-08-10T07:48:16Z","pushed_at":"2015-08-13T18:08:26Z","git_url":"git://github.com/numenta/numenta-apps.git","ssh_url":"git@github.com:numenta/numenta-apps.git","clone_url":"https://github.com/numenta/numenta-apps.git","svn_url":"https://github.com/numenta/numenta-apps","homepage":"http://numenta.com","size":45729,"stargazers_count":48,"watchers_count":48,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":7,"forks":34,"open_issues":7,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/numenta/numenta-apps/pulls/199"},"html":{"href":"https://github.com/numenta/numenta-apps/pull/199"},"issue":{"href":"https://api.github.com/repos/numenta/numenta-apps/issues/199"},"comments":{"href":"https://api.github.com/repos/numenta/numenta-apps/issues/199/comments"},"review_comments":{"href":"https://api.github.com/repos/numenta/numenta-apps/pulls/199/comments"},"review_comment":{"href":"https://api.github.com/repos/numenta/numenta-apps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/numenta/numenta-apps/pulls/199/commits"},"statuses":{"href":"https://api.github.com/repos/numenta/numenta-apps/statuses/ba508069d00a9c577be856f3a75a8d92b07b7299"}}}}