{"action":"created","comment":{"url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls/comments/168514975","pull_request_review_id":96890855,"id":168514975,"diff_hunk":"@@ -0,0 +1,83 @@\n+module OhlohScm::Adapters\n+  class GitSvnAdapter < AbstractAdapter\n+    def pull(source_scm, &block)\n+      @source_scm = source_scm\n+      convert_to_git(&block)\n+    end\n+\n+    def branch_name\n+      'master'\n+    end\n+\n+    private\n+\n+    def convert_to_git(&block)\n+      yield(1, 2) if block_given?\n+\n+      if FileTest.exist?(git_path)\n+        max_step = @source_scm.commit_count(after: head_token)\n+        fetch(max_step, &block)\n+      else\n+        max_step = @source_scm.commit_count(after: 0)\n+        clone(max_step, &block)\n+      end\n+\n+      clean_up_disk\n+      yield(max_step, max_step) if block_given?","path":"lib/ohloh_scm/adapters/git_svn/pull.rb","position":26,"original_position":26,"commit_id":"137fe8d0d9993a199933ae9145c274714442418f","original_commit_id":"137fe8d0d9993a199933ae9145c274714442418f","user":{"login":"notalex","id":1637711,"avatar_url":"https://avatars3.githubusercontent.com/u/1637711?v=4","gravatar_id":"","url":"https://api.github.com/users/notalex","html_url":"https://github.com/notalex","followers_url":"https://api.github.com/users/notalex/followers","following_url":"https://api.github.com/users/notalex/following{/other_user}","gists_url":"https://api.github.com/users/notalex/gists{/gist_id}","starred_url":"https://api.github.com/users/notalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notalex/subscriptions","organizations_url":"https://api.github.com/users/notalex/orgs","repos_url":"https://api.github.com/users/notalex/repos","events_url":"https://api.github.com/users/notalex/events{/privacy}","received_events_url":"https://api.github.com/users/notalex/received_events","type":"User","site_admin":false},"body":"We don't need to do this here. In the `IO.popen` loop, we start the count by 1, so it would yield correct values at the end. If we remove this, we can move the max_step lines into `fetch` and `clone` methods.","created_at":"2018-02-15T15:43:44Z","updated_at":"2018-02-15T15:45:26Z","html_url":"https://github.com/blackducksoftware/ohloh_scm/pull/77#discussion_r168514975","pull_request_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls/77","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls/comments/168514975"},"html":{"href":"https://github.com/blackducksoftware/ohloh_scm/pull/77#discussion_r168514975"},"pull_request":{"href":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls/77"}}},"pull_request":{"url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls/77","id":164302208,"html_url":"https://github.com/blackducksoftware/ohloh_scm/pull/77","diff_url":"https://github.com/blackducksoftware/ohloh_scm/pull/77.diff","patch_url":"https://github.com/blackducksoftware/ohloh_scm/pull/77.patch","issue_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/issues/77","number":77,"state":"open","locked":false,"title":"Converting SVN to GIT using git svn command","user":{"login":"karthikeyanBD","id":8556341,"avatar_url":"https://avatars1.githubusercontent.com/u/8556341?v=4","gravatar_id":"","url":"https://api.github.com/users/karthikeyanBD","html_url":"https://github.com/karthikeyanBD","followers_url":"https://api.github.com/users/karthikeyanBD/followers","following_url":"https://api.github.com/users/karthikeyanBD/following{/other_user}","gists_url":"https://api.github.com/users/karthikeyanBD/gists{/gist_id}","starred_url":"https://api.github.com/users/karthikeyanBD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karthikeyanBD/subscriptions","organizations_url":"https://api.github.com/users/karthikeyanBD/orgs","repos_url":"https://api.github.com/users/karthikeyanBD/repos","events_url":"https://api.github.com/users/karthikeyanBD/events{/privacy}","received_events_url":"https://api.github.com/users/karthikeyanBD/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-01-22T13:09:16Z","updated_at":"2018-02-15T15:45:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e26941d1b6a75636f3aed807f7e84b3bc18a337","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls/77/commits","review_comments_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls/77/comments","review_comment_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/issues/77/comments","statuses_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/statuses/137fe8d0d9993a199933ae9145c274714442418f","head":{"label":"blackducksoftware:git-svn-adapter","ref":"git-svn-adapter","sha":"137fe8d0d9993a199933ae9145c274714442418f","user":{"login":"blackducksoftware","id":431461,"avatar_url":"https://avatars0.githubusercontent.com/u/431461?v=4","gravatar_id":"","url":"https://api.github.com/users/blackducksoftware","html_url":"https://github.com/blackducksoftware","followers_url":"https://api.github.com/users/blackducksoftware/followers","following_url":"https://api.github.com/users/blackducksoftware/following{/other_user}","gists_url":"https://api.github.com/users/blackducksoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/blackducksoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blackducksoftware/subscriptions","organizations_url":"https://api.github.com/users/blackducksoftware/orgs","repos_url":"https://api.github.com/users/blackducksoftware/repos","events_url":"https://api.github.com/users/blackducksoftware/events{/privacy}","received_events_url":"https://api.github.com/users/blackducksoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":1050977,"name":"ohloh_scm","full_name":"blackducksoftware/ohloh_scm","owner":{"login":"blackducksoftware","id":431461,"avatar_url":"https://avatars0.githubusercontent.com/u/431461?v=4","gravatar_id":"","url":"https://api.github.com/users/blackducksoftware","html_url":"https://github.com/blackducksoftware","followers_url":"https://api.github.com/users/blackducksoftware/followers","following_url":"https://api.github.com/users/blackducksoftware/following{/other_user}","gists_url":"https://api.github.com/users/blackducksoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/blackducksoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blackducksoftware/subscriptions","organizations_url":"https://api.github.com/users/blackducksoftware/orgs","repos_url":"https://api.github.com/users/blackducksoftware/repos","events_url":"https://api.github.com/users/blackducksoftware/events{/privacy}","received_events_url":"https://api.github.com/users/blackducksoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blackducksoftware/ohloh_scm","description":"The Ohloh source control management library","fork":true,"url":"https://api.github.com/repos/blackducksoftware/ohloh_scm","forks_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/forks","keys_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/teams","hooks_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/hooks","issue_events_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/issues/events{/number}","events_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/events","assignees_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/assignees{/user}","branches_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/branches{/branch}","tags_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/tags","blobs_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/git/refs{/sha}","trees_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/statuses/{sha}","languages_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/languages","stargazers_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/stargazers","contributors_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/contributors","subscribers_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/subscribers","subscription_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/subscription","commits_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/commits{/sha}","git_commits_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/git/commits{/sha}","comments_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/comments{/number}","issue_comment_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/issues/comments{/number}","contents_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/contents/{+path}","compare_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/merges","archive_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/downloads","issues_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/issues{/number}","pulls_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls{/number}","milestones_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/milestones{/number}","notifications_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/labels{/name}","releases_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/releases{/id}","deployments_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/deployments","created_at":"2010-11-04T12:45:22Z","updated_at":"2018-02-08T02:28:24Z","pushed_at":"2018-02-15T15:20:26Z","git_url":"git://github.com/blackducksoftware/ohloh_scm.git","ssh_url":"git@github.com:blackducksoftware/ohloh_scm.git","clone_url":"https://github.com/blackducksoftware/ohloh_scm.git","svn_url":"https://github.com/blackducksoftware/ohloh_scm","homepage":"http://www.ohloh.net","size":1241,"stargazers_count":50,"watchers_count":50,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":22,"open_issues":6,"watchers":50,"default_branch":"master"}},"base":{"label":"blackducksoftware:master","ref":"master","sha":"14f754bdd00a39c98be7f4ba81308f13819c1850","user":{"login":"blackducksoftware","id":431461,"avatar_url":"https://avatars0.githubusercontent.com/u/431461?v=4","gravatar_id":"","url":"https://api.github.com/users/blackducksoftware","html_url":"https://github.com/blackducksoftware","followers_url":"https://api.github.com/users/blackducksoftware/followers","following_url":"https://api.github.com/users/blackducksoftware/following{/other_user}","gists_url":"https://api.github.com/users/blackducksoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/blackducksoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blackducksoftware/subscriptions","organizations_url":"https://api.github.com/users/blackducksoftware/orgs","repos_url":"https://api.github.com/users/blackducksoftware/repos","events_url":"https://api.github.com/users/blackducksoftware/events{/privacy}","received_events_url":"https://api.github.com/users/blackducksoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":1050977,"name":"ohloh_scm","full_name":"blackducksoftware/ohloh_scm","owner":{"login":"blackducksoftware","id":431461,"avatar_url":"https://avatars0.githubusercontent.com/u/431461?v=4","gravatar_id":"","url":"https://api.github.com/users/blackducksoftware","html_url":"https://github.com/blackducksoftware","followers_url":"https://api.github.com/users/blackducksoftware/followers","following_url":"https://api.github.com/users/blackducksoftware/following{/other_user}","gists_url":"https://api.github.com/users/blackducksoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/blackducksoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blackducksoftware/subscriptions","organizations_url":"https://api.github.com/users/blackducksoftware/orgs","repos_url":"https://api.github.com/users/blackducksoftware/repos","events_url":"https://api.github.com/users/blackducksoftware/events{/privacy}","received_events_url":"https://api.github.com/users/blackducksoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blackducksoftware/ohloh_scm","description":"The Ohloh source control management library","fork":true,"url":"https://api.github.com/repos/blackducksoftware/ohloh_scm","forks_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/forks","keys_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/teams","hooks_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/hooks","issue_events_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/issues/events{/number}","events_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/events","assignees_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/assignees{/user}","branches_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/branches{/branch}","tags_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/tags","blobs_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/git/refs{/sha}","trees_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/statuses/{sha}","languages_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/languages","stargazers_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/stargazers","contributors_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/contributors","subscribers_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/subscribers","subscription_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/subscription","commits_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/commits{/sha}","git_commits_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/git/commits{/sha}","comments_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/comments{/number}","issue_comment_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/issues/comments{/number}","contents_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/contents/{+path}","compare_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/merges","archive_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/downloads","issues_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/issues{/number}","pulls_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls{/number}","milestones_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/milestones{/number}","notifications_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/labels{/name}","releases_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/releases{/id}","deployments_url":"https://api.github.com/repos/blackducksoftware/ohloh_scm/deployments","created_at":"2010-11-04T12:45:22Z","updated_at":"2018-02-08T02:28:24Z","pushed_at":"2018-02-15T15:20:26Z","git_url":"git://github.com/blackducksoftware/ohloh_scm.git","ssh_url":"git@github.com:blackducksoftware/ohloh_scm.git","clone_url":"https://github.com/blackducksoftware/ohloh_scm.git","svn_url":"https://github.com/blackducksoftware/ohloh_scm","homepage":"http://www.ohloh.net","size":1241,"stargazers_count":50,"watchers_count":50,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":22,"open_issues":6,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls/77"},"html":{"href":"https://github.com/blackducksoftware/ohloh_scm/pull/77"},"issue":{"href":"https://api.github.com/repos/blackducksoftware/ohloh_scm/issues/77"},"comments":{"href":"https://api.github.com/repos/blackducksoftware/ohloh_scm/issues/77/comments"},"review_comments":{"href":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls/77/comments"},"review_comment":{"href":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/blackducksoftware/ohloh_scm/pulls/77/commits"},"statuses":{"href":"https://api.github.com/repos/blackducksoftware/ohloh_scm/statuses/137fe8d0d9993a199933ae9145c274714442418f"}},"author_association":"NONE"}}
{"actor":{"display_login":"notalex"}}