GitHub PullRequestReviewCommentEvent at 2014-11-06 02:20:48
Repository: seafile-client
Actor: Chilledheart
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/haiwen/seafile-client/pulls/comments/19922515","id":19922515,"diff_hunk":"@@ -339,7 +339,34 @@ void FileBrowserDialog::downloadFile(const QString& path)\n \n void FileBrowserDialog::uploadFile(const QString& path)\n {\n-    FileUploadTask *task = data_mgr_->createUploadTask(repo_.id, current_path_, path);\n+    bool not_update = true;\n+    QString name = QFileInfo(path).fileName();\n+    // find if there exist a file with the same name\n+    Q_FOREACH(const SeafDirent &dirent, table_model_->dirents())\n+    {\n+        if (dirent.name == name) {\n+            not_update = false;\n+            break;\n+        }\n+    }\n+    // if found\n+    // prompt a dialog to confirm to overwrite the current file\n+    if (!not_update) {","path":"src/filebrowser/file-browser-dialog.cpp","position":17,"original_position":17,"commit_id":"821a4ce4f1326f82e45521304676bfe2b0046e83","original_commit_id":"821a4ce4f1326f82e45521304676bfe2b0046e83","user":{"login":"Chilledheart","id":2123461,"avatar_url":"https://avatars.githubusercontent.com/u/2123461?v=2","gravatar_id":"","url":"https://api.github.com/users/Chilledheart","html_url":"https://github.com/Chilledheart","followers_url":"https://api.github.com/users/Chilledheart/followers","following_url":"https://api.github.com/users/Chilledheart/following{/other_user}","gists_url":"https://api.github.com/users/Chilledheart/gists{/gist_id}","starred_url":"https://api.github.com/users/Chilledheart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chilledheart/subscriptions","organizations_url":"https://api.github.com/users/Chilledheart/orgs","repos_url":"https://api.github.com/users/Chilledheart/repos","events_url":"https://api.github.com/users/Chilledheart/events{/privacy}","received_events_url":"https://api.github.com/users/Chilledheart/received_events","type":"User","site_admin":false},"body":"Yes, i use not_update means it's a valuable you should use with care. More complicate task should be wrapped with kind of signals of complication. \r\n\r\nIt leads to two totally different behaviors and should be defaulted to true value.","created_at":"2014-11-06T02:20:48Z","updated_at":"2014-11-06T02:20:48Z","html_url":"https://github.com/haiwen/seafile-client/pull/271#discussion_r19922515","pull_request_url":"https://api.github.com/repos/haiwen/seafile-client/pulls/271","_links":{"self":{"href":"https://api.github.com/repos/haiwen/seafile-client/pulls/comments/19922515"},"html":{"href":"https://github.com/haiwen/seafile-client/pull/271#discussion_r19922515"},"pull_request":{"href":"https://api.github.com/repos/haiwen/seafile-client/pulls/271"}}},"pull_request":{"url":"https://api.github.com/repos/haiwen/seafile-client/pulls/271","id":23888218,"html_url":"https://github.com/haiwen/seafile-client/pull/271","diff_url":"https://github.com/haiwen/seafile-client/pull/271.diff","patch_url":"https://github.com/haiwen/seafile-client/pull/271.patch","issue_url":"https://api.github.com/repos/haiwen/seafile-client/issues/271","number":271,"state":"open","locked":false,"title":"[RFC] current file exists. overwrite it, or upload as an alternative name","user":{"login":"Chilledheart","id":2123461,"avatar_url":"https://avatars.githubusercontent.com/u/2123461?v=2","gravatar_id":"","url":"https://api.github.com/users/Chilledheart","html_url":"https://github.com/Chilledheart","followers_url":"https://api.github.com/users/Chilledheart/followers","following_url":"https://api.github.com/users/Chilledheart/following{/other_user}","gists_url":"https://api.github.com/users/Chilledheart/gists{/gist_id}","starred_url":"https://api.github.com/users/Chilledheart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chilledheart/subscriptions","organizations_url":"https://api.github.com/users/Chilledheart/orgs","repos_url":"https://api.github.com/users/Chilledheart/repos","events_url":"https://api.github.com/users/Chilledheart/events{/privacy}","received_events_url":"https://api.github.com/users/Chilledheart/received_events","type":"User","site_admin":false},"body":"![screen shot 2014-11-05 at 15 10 36](https://cloud.githubusercontent.com/assets/2123461/4913961/1e3325b0-64bb-11e4-89b3-c8df46b13025.png)\r\n","created_at":"2014-11-05T07:13:32Z","updated_at":"2014-11-06T02:20:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61aa3d6ad4d582db60f9d61660f7cd69a160258d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/haiwen/seafile-client/pulls/271/commits","review_comments_url":"https://api.github.com/repos/haiwen/seafile-client/pulls/271/comments","review_comment_url":"https://api.github.com/repos/haiwen/seafile-client/pulls/comments/{number}","comments_url":"https://api.github.com/repos/haiwen/seafile-client/issues/271/comments","statuses_url":"https://api.github.com/repos/haiwen/seafile-client/statuses/821a4ce4f1326f82e45521304676bfe2b0046e83","head":{"label":"haiwen:patch-18","ref":"patch-18","sha":"821a4ce4f1326f82e45521304676bfe2b0046e83","user":{"login":"haiwen","id":1948782,"avatar_url":"https://avatars.githubusercontent.com/u/1948782?v=2","gravatar_id":"","url":"https://api.github.com/users/haiwen","html_url":"https://github.com/haiwen","followers_url":"https://api.github.com/users/haiwen/followers","following_url":"https://api.github.com/users/haiwen/following{/other_user}","gists_url":"https://api.github.com/users/haiwen/gists{/gist_id}","starred_url":"https://api.github.com/users/haiwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haiwen/subscriptions","organizations_url":"https://api.github.com/users/haiwen/orgs","repos_url":"https://api.github.com/users/haiwen/repos","events_url":"https://api.github.com/users/haiwen/events{/privacy}","received_events_url":"https://api.github.com/users/haiwen/received_events","type":"Organization","site_admin":false},"repo":{"id":11894308,"name":"seafile-client","full_name":"haiwen/seafile-client","owner":{"login":"haiwen","id":1948782,"avatar_url":"https://avatars.githubusercontent.com/u/1948782?v=2","gravatar_id":"","url":"https://api.github.com/users/haiwen","html_url":"https://github.com/haiwen","followers_url":"https://api.github.com/users/haiwen/followers","following_url":"https://api.github.com/users/haiwen/following{/other_user}","gists_url":"https://api.github.com/users/haiwen/gists{/gist_id}","starred_url":"https://api.github.com/users/haiwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haiwen/subscriptions","organizations_url":"https://api.github.com/users/haiwen/orgs","repos_url":"https://api.github.com/users/haiwen/repos","events_url":"https://api.github.com/users/haiwen/events{/privacy}","received_events_url":"https://api.github.com/users/haiwen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/haiwen/seafile-client","description":"Seafile desktop client.","fork":false,"url":"https://api.github.com/repos/haiwen/seafile-client","forks_url":"https://api.github.com/repos/haiwen/seafile-client/forks","keys_url":"https://api.github.com/repos/haiwen/seafile-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haiwen/seafile-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haiwen/seafile-client/teams","hooks_url":"https://api.github.com/repos/haiwen/seafile-client/hooks","issue_events_url":"https://api.github.com/repos/haiwen/seafile-client/issues/events{/number}","events_url":"https://api.github.com/repos/haiwen/seafile-client/events","assignees_url":"https://api.github.com/repos/haiwen/seafile-client/assignees{/user}","branches_url":"https://api.github.com/repos/haiwen/seafile-client/branches{/branch}","tags_url":"https://api.github.com/repos/haiwen/seafile-client/tags","blobs_url":"https://api.github.com/repos/haiwen/seafile-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haiwen/seafile-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haiwen/seafile-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/haiwen/seafile-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haiwen/seafile-client/statuses/{sha}","languages_url":"https://api.github.com/repos/haiwen/seafile-client/languages","stargazers_url":"https://api.github.com/repos/haiwen/seafile-client/stargazers","contributors_url":"https://api.github.com/repos/haiwen/seafile-client/contributors","subscribers_url":"https://api.github.com/repos/haiwen/seafile-client/subscribers","subscription_url":"https://api.github.com/repos/haiwen/seafile-client/subscription","commits_url":"https://api.github.com/repos/haiwen/seafile-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/haiwen/seafile-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/haiwen/seafile-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/haiwen/seafile-client/issues/comments/{number}","contents_url":"https://api.github.com/repos/haiwen/seafile-client/contents/{+path}","compare_url":"https://api.github.com/repos/haiwen/seafile-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haiwen/seafile-client/merges","archive_url":"https://api.github.com/repos/haiwen/seafile-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haiwen/seafile-client/downloads","issues_url":"https://api.github.com/repos/haiwen/seafile-client/issues{/number}","pulls_url":"https://api.github.com/repos/haiwen/seafile-client/pulls{/number}","milestones_url":"https://api.github.com/repos/haiwen/seafile-client/milestones{/number}","notifications_url":"https://api.github.com/repos/haiwen/seafile-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haiwen/seafile-client/labels{/name}","releases_url":"https://api.github.com/repos/haiwen/seafile-client/releases{/id}","created_at":"2013-08-05T09:08:07Z","updated_at":"2014-10-30T12:19:41Z","pushed_at":"2014-11-06T01:57:04Z","git_url":"git://github.com/haiwen/seafile-client.git","ssh_url":"git@github.com:haiwen/seafile-client.git","clone_url":"https://github.com/haiwen/seafile-client.git","svn_url":"https://github.com/haiwen/seafile-client","homepage":"http://seafile.com","size":11802,"stargazers_count":57,"watchers_count":57,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":64,"mirror_url":null,"open_issues_count":90,"forks":64,"open_issues":90,"watchers":57,"default_branch":"master"}},"base":{"label":"haiwen:master","ref":"master","sha":"0ea5e2a6aaac9530187e7781853118a9417bfdf5","user":{"login":"haiwen","id":1948782,"avatar_url":"https://avatars.githubusercontent.com/u/1948782?v=2","gravatar_id":"","url":"https://api.github.com/users/haiwen","html_url":"https://github.com/haiwen","followers_url":"https://api.github.com/users/haiwen/followers","following_url":"https://api.github.com/users/haiwen/following{/other_user}","gists_url":"https://api.github.com/users/haiwen/gists{/gist_id}","starred_url":"https://api.github.com/users/haiwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haiwen/subscriptions","organizations_url":"https://api.github.com/users/haiwen/orgs","repos_url":"https://api.github.com/users/haiwen/repos","events_url":"https://api.github.com/users/haiwen/events{/privacy}","received_events_url":"https://api.github.com/users/haiwen/received_events","type":"Organization","site_admin":false},"repo":{"id":11894308,"name":"seafile-client","full_name":"haiwen/seafile-client","owner":{"login":"haiwen","id":1948782,"avatar_url":"https://avatars.githubusercontent.com/u/1948782?v=2","gravatar_id":"","url":"https://api.github.com/users/haiwen","html_url":"https://github.com/haiwen","followers_url":"https://api.github.com/users/haiwen/followers","following_url":"https://api.github.com/users/haiwen/following{/other_user}","gists_url":"https://api.github.com/users/haiwen/gists{/gist_id}","starred_url":"https://api.github.com/users/haiwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haiwen/subscriptions","organizations_url":"https://api.github.com/users/haiwen/orgs","repos_url":"https://api.github.com/users/haiwen/repos","events_url":"https://api.github.com/users/haiwen/events{/privacy}","received_events_url":"https://api.github.com/users/haiwen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/haiwen/seafile-client","description":"Seafile desktop client.","fork":false,"url":"https://api.github.com/repos/haiwen/seafile-client","forks_url":"https://api.github.com/repos/haiwen/seafile-client/forks","keys_url":"https://api.github.com/repos/haiwen/seafile-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haiwen/seafile-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haiwen/seafile-client/teams","hooks_url":"https://api.github.com/repos/haiwen/seafile-client/hooks","issue_events_url":"https://api.github.com/repos/haiwen/seafile-client/issues/events{/number}","events_url":"https://api.github.com/repos/haiwen/seafile-client/events","assignees_url":"https://api.github.com/repos/haiwen/seafile-client/assignees{/user}","branches_url":"https://api.github.com/repos/haiwen/seafile-client/branches{/branch}","tags_url":"https://api.github.com/repos/haiwen/seafile-client/tags","blobs_url":"https://api.github.com/repos/haiwen/seafile-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haiwen/seafile-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haiwen/seafile-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/haiwen/seafile-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haiwen/seafile-client/statuses/{sha}","languages_url":"https://api.github.com/repos/haiwen/seafile-client/languages","stargazers_url":"https://api.github.com/repos/haiwen/seafile-client/stargazers","contributors_url":"https://api.github.com/repos/haiwen/seafile-client/contributors","subscribers_url":"https://api.github.com/repos/haiwen/seafile-client/subscribers","subscription_url":"https://api.github.com/repos/haiwen/seafile-client/subscription","commits_url":"https://api.github.com/repos/haiwen/seafile-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/haiwen/seafile-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/haiwen/seafile-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/haiwen/seafile-client/issues/comments/{number}","contents_url":"https://api.github.com/repos/haiwen/seafile-client/contents/{+path}","compare_url":"https://api.github.com/repos/haiwen/seafile-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haiwen/seafile-client/merges","archive_url":"https://api.github.com/repos/haiwen/seafile-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haiwen/seafile-client/downloads","issues_url":"https://api.github.com/repos/haiwen/seafile-client/issues{/number}","pulls_url":"https://api.github.com/repos/haiwen/seafile-client/pulls{/number}","milestones_url":"https://api.github.com/repos/haiwen/seafile-client/milestones{/number}","notifications_url":"https://api.github.com/repos/haiwen/seafile-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haiwen/seafile-client/labels{/name}","releases_url":"https://api.github.com/repos/haiwen/seafile-client/releases{/id}","created_at":"2013-08-05T09:08:07Z","updated_at":"2014-10-30T12:19:41Z","pushed_at":"2014-11-06T01:57:04Z","git_url":"git://github.com/haiwen/seafile-client.git","ssh_url":"git@github.com:haiwen/seafile-client.git","clone_url":"https://github.com/haiwen/seafile-client.git","svn_url":"https://github.com/haiwen/seafile-client","homepage":"http://seafile.com","size":11802,"stargazers_count":57,"watchers_count":57,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":64,"mirror_url":null,"open_issues_count":90,"forks":64,"open_issues":90,"watchers":57,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/haiwen/seafile-client/pulls/271"},"html":{"href":"https://github.com/haiwen/seafile-client/pull/271"},"issue":{"href":"https://api.github.com/repos/haiwen/seafile-client/issues/271"},"comments":{"href":"https://api.github.com/repos/haiwen/seafile-client/issues/271/comments"},"review_comments":{"href":"https://api.github.com/repos/haiwen/seafile-client/pulls/271/comments"},"review_comment":{"href":"https://api.github.com/repos/haiwen/seafile-client/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/haiwen/seafile-client/pulls/271/commits"},"statuses":{"href":"https://api.github.com/repos/haiwen/seafile-client/statuses/821a4ce4f1326f82e45521304676bfe2b0046e83"}}}}