{"action":"created","comment":{"url":"https://api.github.com/repos/baidu/bfs/pulls/comments/93765990","pull_request_review_id":14300118,"id":93765990,"diff_hunk":"@@ -215,12 +234,24 @@ bool NameSpace::UpdateFileInfo(const FileInfo& file_info, NameServerLog* log) {\n };\n \n bool NameSpace::GetFileInfo(const std::string& path, FileInfo* file_info) {\n-    return LookUp(path, file_info);\n+    if (!LookUp(path, file_info)) {\n+        return false;\n+    } else {\n+        if (GetFileType(file_info->type()) == kSymlink) {\n+            FileInfo src_info;\n+            if (!GetLinkSrcPath(*file_info, &src_info)) {\n+                return false;\n+            } else {\n+                *file_info = src_info;\n+            }\n+        }\n+    }\n+    return true;\n }\n \n StatusCode NameSpace::CreateFile(const std::string& path, int flags, int mode, int replica_num,\n                                  std::vector<int64_t>* blocks_to_remove,\n-                                 NameServerLog* log) {\n+                                 const std::string &sym_link, NameServerLog* log) {","path":"src/nameserver/namespace.cc","position":53,"original_position":53,"commit_id":"4101ac0d9e9d31534042ae3a5e0625970a0b8767","original_commit_id":"b77d414dfb1016ee8df844b72f9189852c650112","user":{"login":"yvxiang","id":1382038,"avatar_url":"https://avatars.githubusercontent.com/u/1382038?v=3","gravatar_id":"","url":"https://api.github.com/users/yvxiang","html_url":"https://github.com/yvxiang","followers_url":"https://api.github.com/users/yvxiang/followers","following_url":"https://api.github.com/users/yvxiang/following{/other_user}","gists_url":"https://api.github.com/users/yvxiang/gists{/gist_id}","starred_url":"https://api.github.com/users/yvxiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yvxiang/subscriptions","organizations_url":"https://api.github.com/users/yvxiang/orgs","repos_url":"https://api.github.com/users/yvxiang/repos","events_url":"https://api.github.com/users/yvxiang/events{/privacy}","received_events_url":"https://api.github.com/users/yvxiang/received_events","type":"User","site_admin":false},"body":"搞个默认参数是不是挺省事","created_at":"2016-12-23T13:34:56Z","updated_at":"2016-12-23T13:35:10Z","html_url":"https://github.com/baidu/bfs/pull/725#discussion_r93765990","pull_request_url":"https://api.github.com/repos/baidu/bfs/pulls/725","_links":{"self":{"href":"https://api.github.com/repos/baidu/bfs/pulls/comments/93765990"},"html":{"href":"https://github.com/baidu/bfs/pull/725#discussion_r93765990"},"pull_request":{"href":"https://api.github.com/repos/baidu/bfs/pulls/725"}}},"pull_request":{"url":"https://api.github.com/repos/baidu/bfs/pulls/725","id":99229688,"html_url":"https://github.com/baidu/bfs/pull/725","diff_url":"https://github.com/baidu/bfs/pull/725.diff","patch_url":"https://github.com/baidu/bfs/pull/725.patch","issue_url":"https://api.github.com/repos/baidu/bfs/issues/725","number":725,"state":"open","locked":false,"title":"Link","user":{"login":"DoDo1992","id":19264420,"avatar_url":"https://avatars.githubusercontent.com/u/19264420?v=3","gravatar_id":"","url":"https://api.github.com/users/DoDo1992","html_url":"https://github.com/DoDo1992","followers_url":"https://api.github.com/users/DoDo1992/followers","following_url":"https://api.github.com/users/DoDo1992/following{/other_user}","gists_url":"https://api.github.com/users/DoDo1992/gists{/gist_id}","starred_url":"https://api.github.com/users/DoDo1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoDo1992/subscriptions","organizations_url":"https://api.github.com/users/DoDo1992/orgs","repos_url":"https://api.github.com/users/DoDo1992/repos","events_url":"https://api.github.com/users/DoDo1992/events{/privacy}","received_events_url":"https://api.github.com/users/DoDo1992/received_events","type":"User","site_admin":false},"body":"(#704)","created_at":"2016-12-23T11:10:19Z","updated_at":"2016-12-23T13:35:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2676fceae31f84d87efc6635bc4b08a9817c6198","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/baidu/bfs/pulls/725/commits","review_comments_url":"https://api.github.com/repos/baidu/bfs/pulls/725/comments","review_comment_url":"https://api.github.com/repos/baidu/bfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/baidu/bfs/issues/725/comments","statuses_url":"https://api.github.com/repos/baidu/bfs/statuses/4101ac0d9e9d31534042ae3a5e0625970a0b8767","head":{"label":"DoDo1992:link","ref":"link","sha":"4101ac0d9e9d31534042ae3a5e0625970a0b8767","user":{"login":"DoDo1992","id":19264420,"avatar_url":"https://avatars.githubusercontent.com/u/19264420?v=3","gravatar_id":"","url":"https://api.github.com/users/DoDo1992","html_url":"https://github.com/DoDo1992","followers_url":"https://api.github.com/users/DoDo1992/followers","following_url":"https://api.github.com/users/DoDo1992/following{/other_user}","gists_url":"https://api.github.com/users/DoDo1992/gists{/gist_id}","starred_url":"https://api.github.com/users/DoDo1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoDo1992/subscriptions","organizations_url":"https://api.github.com/users/DoDo1992/orgs","repos_url":"https://api.github.com/users/DoDo1992/repos","events_url":"https://api.github.com/users/DoDo1992/events{/privacy}","received_events_url":"https://api.github.com/users/DoDo1992/received_events","type":"User","site_admin":false},"repo":{"id":76324354,"name":"bfs","full_name":"DoDo1992/bfs","owner":{"login":"DoDo1992","id":19264420,"avatar_url":"https://avatars.githubusercontent.com/u/19264420?v=3","gravatar_id":"","url":"https://api.github.com/users/DoDo1992","html_url":"https://github.com/DoDo1992","followers_url":"https://api.github.com/users/DoDo1992/followers","following_url":"https://api.github.com/users/DoDo1992/following{/other_user}","gists_url":"https://api.github.com/users/DoDo1992/gists{/gist_id}","starred_url":"https://api.github.com/users/DoDo1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoDo1992/subscriptions","organizations_url":"https://api.github.com/users/DoDo1992/orgs","repos_url":"https://api.github.com/users/DoDo1992/repos","events_url":"https://api.github.com/users/DoDo1992/events{/privacy}","received_events_url":"https://api.github.com/users/DoDo1992/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DoDo1992/bfs","description":"The Baidu File System.","fork":true,"url":"https://api.github.com/repos/DoDo1992/bfs","forks_url":"https://api.github.com/repos/DoDo1992/bfs/forks","keys_url":"https://api.github.com/repos/DoDo1992/bfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoDo1992/bfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoDo1992/bfs/teams","hooks_url":"https://api.github.com/repos/DoDo1992/bfs/hooks","issue_events_url":"https://api.github.com/repos/DoDo1992/bfs/issues/events{/number}","events_url":"https://api.github.com/repos/DoDo1992/bfs/events","assignees_url":"https://api.github.com/repos/DoDo1992/bfs/assignees{/user}","branches_url":"https://api.github.com/repos/DoDo1992/bfs/branches{/branch}","tags_url":"https://api.github.com/repos/DoDo1992/bfs/tags","blobs_url":"https://api.github.com/repos/DoDo1992/bfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoDo1992/bfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoDo1992/bfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoDo1992/bfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoDo1992/bfs/statuses/{sha}","languages_url":"https://api.github.com/repos/DoDo1992/bfs/languages","stargazers_url":"https://api.github.com/repos/DoDo1992/bfs/stargazers","contributors_url":"https://api.github.com/repos/DoDo1992/bfs/contributors","subscribers_url":"https://api.github.com/repos/DoDo1992/bfs/subscribers","subscription_url":"https://api.github.com/repos/DoDo1992/bfs/subscription","commits_url":"https://api.github.com/repos/DoDo1992/bfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoDo1992/bfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoDo1992/bfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoDo1992/bfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoDo1992/bfs/contents/{+path}","compare_url":"https://api.github.com/repos/DoDo1992/bfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoDo1992/bfs/merges","archive_url":"https://api.github.com/repos/DoDo1992/bfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoDo1992/bfs/downloads","issues_url":"https://api.github.com/repos/DoDo1992/bfs/issues{/number}","pulls_url":"https://api.github.com/repos/DoDo1992/bfs/pulls{/number}","milestones_url":"https://api.github.com/repos/DoDo1992/bfs/milestones{/number}","notifications_url":"https://api.github.com/repos/DoDo1992/bfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoDo1992/bfs/labels{/name}","releases_url":"https://api.github.com/repos/DoDo1992/bfs/releases{/id}","deployments_url":"https://api.github.com/repos/DoDo1992/bfs/deployments","created_at":"2016-12-13T05:02:25Z","updated_at":"2016-12-13T05:02:26Z","pushed_at":"2016-12-23T11:57:13Z","git_url":"git://github.com/DoDo1992/bfs.git","ssh_url":"git@github.com:DoDo1992/bfs.git","clone_url":"https://github.com/DoDo1992/bfs.git","svn_url":"https://github.com/DoDo1992/bfs","homepage":"","size":11455,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"baidu:master","ref":"master","sha":"d4334c74f1eb2ac7195f87bb8c48574c495f4b3f","user":{"login":"baidu","id":13245940,"avatar_url":"https://avatars.githubusercontent.com/u/13245940?v=3","gravatar_id":"","url":"https://api.github.com/users/baidu","html_url":"https://github.com/baidu","followers_url":"https://api.github.com/users/baidu/followers","following_url":"https://api.github.com/users/baidu/following{/other_user}","gists_url":"https://api.github.com/users/baidu/gists{/gist_id}","starred_url":"https://api.github.com/users/baidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baidu/subscriptions","organizations_url":"https://api.github.com/users/baidu/orgs","repos_url":"https://api.github.com/users/baidu/repos","events_url":"https://api.github.com/users/baidu/events{/privacy}","received_events_url":"https://api.github.com/users/baidu/received_events","type":"Organization","site_admin":false},"repo":{"id":26562172,"name":"bfs","full_name":"baidu/bfs","owner":{"login":"baidu","id":13245940,"avatar_url":"https://avatars.githubusercontent.com/u/13245940?v=3","gravatar_id":"","url":"https://api.github.com/users/baidu","html_url":"https://github.com/baidu","followers_url":"https://api.github.com/users/baidu/followers","following_url":"https://api.github.com/users/baidu/following{/other_user}","gists_url":"https://api.github.com/users/baidu/gists{/gist_id}","starred_url":"https://api.github.com/users/baidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baidu/subscriptions","organizations_url":"https://api.github.com/users/baidu/orgs","repos_url":"https://api.github.com/users/baidu/repos","events_url":"https://api.github.com/users/baidu/events{/privacy}","received_events_url":"https://api.github.com/users/baidu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/baidu/bfs","description":"The Baidu File System.","fork":false,"url":"https://api.github.com/repos/baidu/bfs","forks_url":"https://api.github.com/repos/baidu/bfs/forks","keys_url":"https://api.github.com/repos/baidu/bfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baidu/bfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baidu/bfs/teams","hooks_url":"https://api.github.com/repos/baidu/bfs/hooks","issue_events_url":"https://api.github.com/repos/baidu/bfs/issues/events{/number}","events_url":"https://api.github.com/repos/baidu/bfs/events","assignees_url":"https://api.github.com/repos/baidu/bfs/assignees{/user}","branches_url":"https://api.github.com/repos/baidu/bfs/branches{/branch}","tags_url":"https://api.github.com/repos/baidu/bfs/tags","blobs_url":"https://api.github.com/repos/baidu/bfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baidu/bfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baidu/bfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/baidu/bfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baidu/bfs/statuses/{sha}","languages_url":"https://api.github.com/repos/baidu/bfs/languages","stargazers_url":"https://api.github.com/repos/baidu/bfs/stargazers","contributors_url":"https://api.github.com/repos/baidu/bfs/contributors","subscribers_url":"https://api.github.com/repos/baidu/bfs/subscribers","subscription_url":"https://api.github.com/repos/baidu/bfs/subscription","commits_url":"https://api.github.com/repos/baidu/bfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/baidu/bfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/baidu/bfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/baidu/bfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/baidu/bfs/contents/{+path}","compare_url":"https://api.github.com/repos/baidu/bfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baidu/bfs/merges","archive_url":"https://api.github.com/repos/baidu/bfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baidu/bfs/downloads","issues_url":"https://api.github.com/repos/baidu/bfs/issues{/number}","pulls_url":"https://api.github.com/repos/baidu/bfs/pulls{/number}","milestones_url":"https://api.github.com/repos/baidu/bfs/milestones{/number}","notifications_url":"https://api.github.com/repos/baidu/bfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baidu/bfs/labels{/name}","releases_url":"https://api.github.com/repos/baidu/bfs/releases{/id}","deployments_url":"https://api.github.com/repos/baidu/bfs/deployments","created_at":"2014-11-13T00:00:29Z","updated_at":"2016-12-23T10:06:13Z","pushed_at":"2016-12-23T11:57:14Z","git_url":"git://github.com/baidu/bfs.git","ssh_url":"git@github.com:baidu/bfs.git","clone_url":"https://github.com/baidu/bfs.git","svn_url":"https://github.com/baidu/bfs","homepage":"","size":11437,"stargazers_count":1713,"watchers_count":1713,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":269,"mirror_url":null,"open_issues_count":71,"forks":269,"open_issues":71,"watchers":1713,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/baidu/bfs/pulls/725"},"html":{"href":"https://github.com/baidu/bfs/pull/725"},"issue":{"href":"https://api.github.com/repos/baidu/bfs/issues/725"},"comments":{"href":"https://api.github.com/repos/baidu/bfs/issues/725/comments"},"review_comments":{"href":"https://api.github.com/repos/baidu/bfs/pulls/725/comments"},"review_comment":{"href":"https://api.github.com/repos/baidu/bfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/baidu/bfs/pulls/725/commits"},"statuses":{"href":"https://api.github.com/repos/baidu/bfs/statuses/4101ac0d9e9d31534042ae3a5e0625970a0b8767"}}}}
{"actor":{"display_login":"yvxiang"}}