{"action":"created","comment":{"url":"https://api.github.com/repos/olofk/fusesoc/pulls/comments/167433981","pull_request_review_id":95654753,"id":167433981,"diff_hunk":"@@ -155,9 +156,19 @@ def add_library(cm, args):\n     library = {}\n     name = args.name\n     sync_uri = vars(args)['sync-uri']\n-    if os.path.isdir(sync_uri) and not args.location:\n-        logger.info(\"Detecting {} as a local library\".format(sync_uri))\n+    if 'sync-type' in vars(args):\n+        provider = vars(args)['sync-type']\n+        library['sync-type'] = provider\n+    else:\n+        provider = 'git'\n+\n+    if provider == 'local' and not args.location:\n+        logger.info(\"Interpreting sync-uri '{}' as location for local provider.\".format(sync_uri))\n         library['location'] = os.path.abspath(sync_uri)\n+        library['sync-type'] = 'local'\n+    elif provider == 'local' and os.path.abspath(args.location) != os.path.abspath(sync_uri):\n+        logger.error(\"Location '{}' does not match sync-uri '{}' for local provider. Consider specifying only sync-uri.\".format(args.location, sync_uri))\n+        exit(1)","path":"fusesoc/main.py","position":55,"original_position":28,"commit_id":"9f43ebd9678687251e9c4a945d582d00f0fcb6c2","original_commit_id":"3134c90c34d38c2087c92da44d8b27df023bc09b","user":{"login":"olofk","id":2194902,"avatar_url":"https://avatars2.githubusercontent.com/u/2194902?v=4","gravatar_id":"","url":"https://api.github.com/users/olofk","html_url":"https://github.com/olofk","followers_url":"https://api.github.com/users/olofk/followers","following_url":"https://api.github.com/users/olofk/following{/other_user}","gists_url":"https://api.github.com/users/olofk/gists{/gist_id}","starred_url":"https://api.github.com/users/olofk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olofk/subscriptions","organizations_url":"https://api.github.com/users/olofk/orgs","repos_url":"https://api.github.com/users/olofk/repos","events_url":"https://api.github.com/users/olofk/events{/privacy}","received_events_url":"https://api.github.com/users/olofk/received_events","type":"User","site_admin":false},"body":"I see. It's unfortunate that sync-uri means different things for local and remote libraries. Maybe we need to go back to the drawing table and rethink the CLI slightly, but until then we do it like this","created_at":"2018-02-11T12:57:52Z","updated_at":"2018-02-11T12:57:52Z","html_url":"https://github.com/olofk/fusesoc/pull/192#discussion_r167433981","pull_request_url":"https://api.github.com/repos/olofk/fusesoc/pulls/192","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/olofk/fusesoc/pulls/comments/167433981"},"html":{"href":"https://github.com/olofk/fusesoc/pull/192#discussion_r167433981"},"pull_request":{"href":"https://api.github.com/repos/olofk/fusesoc/pulls/192"}},"in_reply_to_id":167411392},"pull_request":{"url":"https://api.github.com/repos/olofk/fusesoc/pulls/192","id":165590776,"html_url":"https://github.com/olofk/fusesoc/pull/192","diff_url":"https://github.com/olofk/fusesoc/pull/192.diff","patch_url":"https://github.com/olofk/fusesoc/pull/192.patch","issue_url":"https://api.github.com/repos/olofk/fusesoc/issues/192","number":192,"state":"open","locked":false,"title":"Support for using 'sync-type' to determine library provider","user":{"login":"awygle","id":7854806,"avatar_url":"https://avatars2.githubusercontent.com/u/7854806?v=4","gravatar_id":"","url":"https://api.github.com/users/awygle","html_url":"https://github.com/awygle","followers_url":"https://api.github.com/users/awygle/followers","following_url":"https://api.github.com/users/awygle/following{/other_user}","gists_url":"https://api.github.com/users/awygle/gists{/gist_id}","starred_url":"https://api.github.com/users/awygle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awygle/subscriptions","organizations_url":"https://api.github.com/users/awygle/orgs","repos_url":"https://api.github.com/users/awygle/repos","events_url":"https://api.github.com/users/awygle/events{/privacy}","received_events_url":"https://api.github.com/users/awygle/received_events","type":"User","site_admin":false},"body":"This patch adds a 'sync-type' field to the library sections of the config file which specifies how to acquire the library. Currently two sync-types are supported, 'git' and 'local', with 'git' assuming a Git repository and 'local' acting much like `pip install -e` - that is,  simply using the contents of the provided directory directly. Down the line we would add 'hg', 'svn', or other backends as needed.\r\n\r\nThe Provider classes/modules which are used to fetch cores are expanded to allow managing libraries as well.\r\n\r\nThis patch is intended for merging sometime after 1.8.","created_at":"2018-01-28T22:17:18Z","updated_at":"2018-02-11T12:57:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64b87d0b472510d3424829399382c93fe60f71e1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/olofk/fusesoc/pulls/192/commits","review_comments_url":"https://api.github.com/repos/olofk/fusesoc/pulls/192/comments","review_comment_url":"https://api.github.com/repos/olofk/fusesoc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/olofk/fusesoc/issues/192/comments","statuses_url":"https://api.github.com/repos/olofk/fusesoc/statuses/9f43ebd9678687251e9c4a945d582d00f0fcb6c2","head":{"label":"awygle:sync-type","ref":"sync-type","sha":"9f43ebd9678687251e9c4a945d582d00f0fcb6c2","user":{"login":"awygle","id":7854806,"avatar_url":"https://avatars2.githubusercontent.com/u/7854806?v=4","gravatar_id":"","url":"https://api.github.com/users/awygle","html_url":"https://github.com/awygle","followers_url":"https://api.github.com/users/awygle/followers","following_url":"https://api.github.com/users/awygle/following{/other_user}","gists_url":"https://api.github.com/users/awygle/gists{/gist_id}","starred_url":"https://api.github.com/users/awygle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awygle/subscriptions","organizations_url":"https://api.github.com/users/awygle/orgs","repos_url":"https://api.github.com/users/awygle/repos","events_url":"https://api.github.com/users/awygle/events{/privacy}","received_events_url":"https://api.github.com/users/awygle/received_events","type":"User","site_admin":false},"repo":{"id":104537544,"name":"fusesoc","full_name":"awygle/fusesoc","owner":{"login":"awygle","id":7854806,"avatar_url":"https://avatars2.githubusercontent.com/u/7854806?v=4","gravatar_id":"","url":"https://api.github.com/users/awygle","html_url":"https://github.com/awygle","followers_url":"https://api.github.com/users/awygle/followers","following_url":"https://api.github.com/users/awygle/following{/other_user}","gists_url":"https://api.github.com/users/awygle/gists{/gist_id}","starred_url":"https://api.github.com/users/awygle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awygle/subscriptions","organizations_url":"https://api.github.com/users/awygle/orgs","repos_url":"https://api.github.com/users/awygle/repos","events_url":"https://api.github.com/users/awygle/events{/privacy}","received_events_url":"https://api.github.com/users/awygle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/awygle/fusesoc","description":"FuseSoC is a package manager and a set of build tools for FPGA/ASIC development","fork":true,"url":"https://api.github.com/repos/awygle/fusesoc","forks_url":"https://api.github.com/repos/awygle/fusesoc/forks","keys_url":"https://api.github.com/repos/awygle/fusesoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awygle/fusesoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awygle/fusesoc/teams","hooks_url":"https://api.github.com/repos/awygle/fusesoc/hooks","issue_events_url":"https://api.github.com/repos/awygle/fusesoc/issues/events{/number}","events_url":"https://api.github.com/repos/awygle/fusesoc/events","assignees_url":"https://api.github.com/repos/awygle/fusesoc/assignees{/user}","branches_url":"https://api.github.com/repos/awygle/fusesoc/branches{/branch}","tags_url":"https://api.github.com/repos/awygle/fusesoc/tags","blobs_url":"https://api.github.com/repos/awygle/fusesoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awygle/fusesoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awygle/fusesoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/awygle/fusesoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awygle/fusesoc/statuses/{sha}","languages_url":"https://api.github.com/repos/awygle/fusesoc/languages","stargazers_url":"https://api.github.com/repos/awygle/fusesoc/stargazers","contributors_url":"https://api.github.com/repos/awygle/fusesoc/contributors","subscribers_url":"https://api.github.com/repos/awygle/fusesoc/subscribers","subscription_url":"https://api.github.com/repos/awygle/fusesoc/subscription","commits_url":"https://api.github.com/repos/awygle/fusesoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/awygle/fusesoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/awygle/fusesoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/awygle/fusesoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/awygle/fusesoc/contents/{+path}","compare_url":"https://api.github.com/repos/awygle/fusesoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awygle/fusesoc/merges","archive_url":"https://api.github.com/repos/awygle/fusesoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awygle/fusesoc/downloads","issues_url":"https://api.github.com/repos/awygle/fusesoc/issues{/number}","pulls_url":"https://api.github.com/repos/awygle/fusesoc/pulls{/number}","milestones_url":"https://api.github.com/repos/awygle/fusesoc/milestones{/number}","notifications_url":"https://api.github.com/repos/awygle/fusesoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awygle/fusesoc/labels{/name}","releases_url":"https://api.github.com/repos/awygle/fusesoc/releases{/id}","deployments_url":"https://api.github.com/repos/awygle/fusesoc/deployments","created_at":"2017-09-23T03:10:48Z","updated_at":"2017-09-23T03:10:50Z","pushed_at":"2018-02-11T04:00:50Z","git_url":"git://github.com/awygle/fusesoc.git","ssh_url":"git@github.com:awygle/fusesoc.git","clone_url":"https://github.com/awygle/fusesoc.git","svn_url":"https://github.com/awygle/fusesoc","homepage":"","size":1614,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"olofk:master","ref":"master","sha":"36c4d4bd19dac7d7fa4c221b4095d9ba7c57a5bf","user":{"login":"olofk","id":2194902,"avatar_url":"https://avatars2.githubusercontent.com/u/2194902?v=4","gravatar_id":"","url":"https://api.github.com/users/olofk","html_url":"https://github.com/olofk","followers_url":"https://api.github.com/users/olofk/followers","following_url":"https://api.github.com/users/olofk/following{/other_user}","gists_url":"https://api.github.com/users/olofk/gists{/gist_id}","starred_url":"https://api.github.com/users/olofk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olofk/subscriptions","organizations_url":"https://api.github.com/users/olofk/orgs","repos_url":"https://api.github.com/users/olofk/repos","events_url":"https://api.github.com/users/olofk/events{/privacy}","received_events_url":"https://api.github.com/users/olofk/received_events","type":"User","site_admin":false},"repo":{"id":16964283,"name":"fusesoc","full_name":"olofk/fusesoc","owner":{"login":"olofk","id":2194902,"avatar_url":"https://avatars2.githubusercontent.com/u/2194902?v=4","gravatar_id":"","url":"https://api.github.com/users/olofk","html_url":"https://github.com/olofk","followers_url":"https://api.github.com/users/olofk/followers","following_url":"https://api.github.com/users/olofk/following{/other_user}","gists_url":"https://api.github.com/users/olofk/gists{/gist_id}","starred_url":"https://api.github.com/users/olofk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olofk/subscriptions","organizations_url":"https://api.github.com/users/olofk/orgs","repos_url":"https://api.github.com/users/olofk/repos","events_url":"https://api.github.com/users/olofk/events{/privacy}","received_events_url":"https://api.github.com/users/olofk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/olofk/fusesoc","description":"FuseSoC is a package manager and a set of build tools for FPGA/ASIC development","fork":false,"url":"https://api.github.com/repos/olofk/fusesoc","forks_url":"https://api.github.com/repos/olofk/fusesoc/forks","keys_url":"https://api.github.com/repos/olofk/fusesoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/olofk/fusesoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/olofk/fusesoc/teams","hooks_url":"https://api.github.com/repos/olofk/fusesoc/hooks","issue_events_url":"https://api.github.com/repos/olofk/fusesoc/issues/events{/number}","events_url":"https://api.github.com/repos/olofk/fusesoc/events","assignees_url":"https://api.github.com/repos/olofk/fusesoc/assignees{/user}","branches_url":"https://api.github.com/repos/olofk/fusesoc/branches{/branch}","tags_url":"https://api.github.com/repos/olofk/fusesoc/tags","blobs_url":"https://api.github.com/repos/olofk/fusesoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/olofk/fusesoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/olofk/fusesoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/olofk/fusesoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/olofk/fusesoc/statuses/{sha}","languages_url":"https://api.github.com/repos/olofk/fusesoc/languages","stargazers_url":"https://api.github.com/repos/olofk/fusesoc/stargazers","contributors_url":"https://api.github.com/repos/olofk/fusesoc/contributors","subscribers_url":"https://api.github.com/repos/olofk/fusesoc/subscribers","subscription_url":"https://api.github.com/repos/olofk/fusesoc/subscription","commits_url":"https://api.github.com/repos/olofk/fusesoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/olofk/fusesoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/olofk/fusesoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/olofk/fusesoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/olofk/fusesoc/contents/{+path}","compare_url":"https://api.github.com/repos/olofk/fusesoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/olofk/fusesoc/merges","archive_url":"https://api.github.com/repos/olofk/fusesoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/olofk/fusesoc/downloads","issues_url":"https://api.github.com/repos/olofk/fusesoc/issues{/number}","pulls_url":"https://api.github.com/repos/olofk/fusesoc/pulls{/number}","milestones_url":"https://api.github.com/repos/olofk/fusesoc/milestones{/number}","notifications_url":"https://api.github.com/repos/olofk/fusesoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/olofk/fusesoc/labels{/name}","releases_url":"https://api.github.com/repos/olofk/fusesoc/releases{/id}","deployments_url":"https://api.github.com/repos/olofk/fusesoc/deployments","created_at":"2014-02-18T21:27:06Z","updated_at":"2018-02-10T19:26:09Z","pushed_at":"2018-02-11T04:00:51Z","git_url":"git://github.com/olofk/fusesoc.git","ssh_url":"git@github.com:olofk/fusesoc.git","clone_url":"https://github.com/olofk/fusesoc.git","svn_url":"https://github.com/olofk/fusesoc","homepage":"","size":1571,"stargazers_count":171,"watchers_count":171,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":69,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":69,"open_issues":26,"watchers":171,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/olofk/fusesoc/pulls/192"},"html":{"href":"https://github.com/olofk/fusesoc/pull/192"},"issue":{"href":"https://api.github.com/repos/olofk/fusesoc/issues/192"},"comments":{"href":"https://api.github.com/repos/olofk/fusesoc/issues/192/comments"},"review_comments":{"href":"https://api.github.com/repos/olofk/fusesoc/pulls/192/comments"},"review_comment":{"href":"https://api.github.com/repos/olofk/fusesoc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/olofk/fusesoc/pulls/192/commits"},"statuses":{"href":"https://api.github.com/repos/olofk/fusesoc/statuses/9f43ebd9678687251e9c4a945d582d00f0fcb6c2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"olofk"}}