{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/che/pulls/comments/81755970","pull_request_review_id":2711371,"id":81755970,"diff_hunk":"@@ -99,62 +106,84 @@ public void merge() {\n \n         checkState(resources != null && resources.length == 1);\n \n-        service.info(project.getLocation(), toRelative(project, resources[0]), \"HEAD\", false).then(new Operation<InfoResponse>() {\n-            @Override\n-            public void apply(InfoResponse response) throws OperationException {\n-                if (response.getErrorOutput() != null && !response.getErrorOutput().isEmpty()) {\n-                    printErrors(response.getErrorOutput(), constants.commandInfo());\n-                    notificationManager.notify(\"Unable to execute subversion command\", FAIL, FLOAT_MODE);\n-                    return;\n-                }\n-\n-                mergeTarget = response.getItems().get(0);\n-                view.targetTextBox().setValue(mergeTarget.getRelativeURL());\n-\n-                String repositoryRoot = mergeTarget.getRepositoryRoot();\n-\n-                service.info(project.getLocation(), repositoryRoot, \"HEAD\", true)\n-                       .then(new Operation<InfoResponse>() {\n-                                           @Override\n-                                           public void apply(InfoResponse response) throws OperationException {\n-                                               if (response.getErrorOutput() != null && !response.getErrorOutput().isEmpty()) {\n-                                                   printErrors(response.getErrorOutput(), constants.commandInfo());\n-                                                   notificationManager.notify(\"Unable to execute subversion command\", FAIL, FLOAT_MODE);\n-                                                   return;\n-                                               }\n-\n-                                               sourceURL = response.getItems().get(0).getURL();\n-                                               SubversionItemNode subversionTreeNode = new SubversionItemNode(response.getItems().get(0));\n-\n-                                               List<Node> children = new ArrayList<>();\n-                                               if (response.getItems().size() > 1) {\n-                                                   for (int i = 1; i < response.getItems().size(); i++) {\n-                                                       SubversionItem item = response.getItems().get(i);\n-                                                       if (!\"file\".equals(item.getNodeKind())) {\n-                                                           children.add(new SubversionItemNode(item));\n-                                                       }\n-                                                   }\n-                                               }\n-\n-                                               subversionTreeNode.setChildren(children);\n-                                               view.setRootNode(subversionTreeNode);\n-                                               view.show();\n-                                               validateSourceURL();\n-                                           }\n-                                       })\n-                       .catchError(new Operation<PromiseError>() {\n-                                           @Override\n-                                           public void apply(PromiseError error) throws OperationException {\n-                                               notificationManager.notify(error.getMessage(), FAIL, FLOAT_MODE);\n-                                           }\n-                                       });\n-            }\n-        }).catchError(new Operation<PromiseError>() {\n-            @Override\n-            public void apply(PromiseError error) throws OperationException {\n-                notificationManager.notify(error.getMessage(), FAIL, FLOAT_MODE);\n-            }\n-        });\n+        merge(project, resources, null);\n+    }\n+\n+    private void merge(final Project project, final Resource[] resources, final Credentials credentials) {\n+        service.info(project.getLocation(), toRelative(project, resources[0]), \"HEAD\", false, credentials)\n+               .then(new Operation<InfoResponse>() {\n+                   @Override\n+                   public void apply(InfoResponse response) throws OperationException {\n+                       if (response.getErrorOutput() != null && !response.getErrorOutput().isEmpty()) {\n+                           printErrors(response.getErrorOutput(), constants.commandInfo());\n+                           notificationManager.notify(\"Unable to execute subversion command\", FAIL, FLOAT_MODE);\n+                           return;\n+                       }\n+\n+                       mergeTarget = response.getItems().get(0);\n+                       view.targetTextBox().setValue(mergeTarget.getRelativeURL());\n+\n+                       String repositoryRoot = mergeTarget.getRepositoryRoot();\n+\n+                       service.info(project.getLocation(), repositoryRoot, \"HEAD\", true)\n+                              .then(new Operation<InfoResponse>() {\n+                                  @Override\n+                                  public void apply(InfoResponse response) throws OperationException {\n+                                      if (!response.getErrorOutput().isEmpty()) {\n+                                          printErrors(response.getErrorOutput(), constants.commandInfo());\n+                                          notificationManager.notify(\"Unable to execute subversion command\", FAIL, FLOAT_MODE);\n+                                          return;\n+                                      }\n+\n+                                      sourceURL = response.getItems().get(0).getURL();\n+                                      SubversionItemNode subversionTreeNode = new SubversionItemNode(response.getItems().get(0));\n+\n+                                      List<Node> children = new ArrayList<>();\n+                                      if (response.getItems().size() > 1) {\n+                                          for (int i = 1; i < response.getItems().size(); i++) {\n+                                              SubversionItem item = response.getItems().get(i);\n+                                              if (!\"file\".equals(item.getNodeKind())) {\n+                                                  children.add(new SubversionItemNode(item));\n+                                              }\n+                                          }\n+                                      }\n+\n+                                      subversionTreeNode.setChildren(children);\n+                                      view.setRootNode(subversionTreeNode);\n+                                      view.show();\n+                                      validateSourceURL();\n+                                  }\n+                              })\n+                              .catchError(new Operation<PromiseError>() {\n+                                  @Override\n+                                  public void apply(PromiseError error) throws OperationException {\n+                                      notificationManager.notify(error.getMessage(), FAIL, FLOAT_MODE);\n+                                  }\n+                              });\n+                   }\n+               })\n+               .catchError(new Operation<PromiseError>() {\n+                   @Override\n+                   public void apply(PromiseError error) throws OperationException {\n+                       if (getErrorCode(error.getCause()) == UNAUTHORIZED_SVN_OPERATION) {","path":"plugins/plugin-svn/che-plugin-svn-ext-ide/src/main/java/org/eclipse/che/plugin/svn/ide/merge/MergePresenter.java","position":163,"original_position":163,"commit_id":"b573fc5d1e474ac6602733be399ce0f4404cb283","original_commit_id":"1b3d7ccc35f023ae11482d1295c866bac3b2d266","user":{"login":"vinokurig","id":7668752,"avatar_url":"https://avatars.githubusercontent.com/u/7668752?v=3","gravatar_id":"","url":"https://api.github.com/users/vinokurig","html_url":"https://github.com/vinokurig","followers_url":"https://api.github.com/users/vinokurig/followers","following_url":"https://api.github.com/users/vinokurig/following{/other_user}","gists_url":"https://api.github.com/users/vinokurig/gists{/gist_id}","starred_url":"https://api.github.com/users/vinokurig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinokurig/subscriptions","organizations_url":"https://api.github.com/users/vinokurig/orgs","repos_url":"https://api.github.com/users/vinokurig/repos","events_url":"https://api.github.com/users/vinokurig/events{/privacy}","received_events_url":"https://api.github.com/users/vinokurig/received_events","type":"User","site_admin":false},"body":"replaced the logic to extended `SubversionActionPresenter`","created_at":"2016-10-04T13:29:38Z","updated_at":"2016-10-04T13:29:38Z","html_url":"https://github.com/eclipse/che/pull/2672#discussion_r81755970","pull_request_url":"https://api.github.com/repos/eclipse/che/pulls/2672","_links":{"self":{"href":"https://api.github.com/repos/eclipse/che/pulls/comments/81755970"},"html":{"href":"https://github.com/eclipse/che/pull/2672#discussion_r81755970"},"pull_request":{"href":"https://api.github.com/repos/eclipse/che/pulls/2672"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/che/pulls/2672","id":87549871,"html_url":"https://github.com/eclipse/che/pull/2672","diff_url":"https://github.com/eclipse/che/pull/2672.diff","patch_url":"https://github.com/eclipse/che/pull/2672.patch","issue_url":"https://api.github.com/repos/eclipse/che/issues/2672","number":2672,"state":"open","locked":false,"title":"CODENVY-581: Сache svn credentials instead of storing them in credentials provider","user":{"login":"vinokurig","id":7668752,"avatar_url":"https://avatars.githubusercontent.com/u/7668752?v=3","gravatar_id":"","url":"https://api.github.com/users/vinokurig","html_url":"https://github.com/vinokurig","followers_url":"https://api.github.com/users/vinokurig/followers","following_url":"https://api.github.com/users/vinokurig/following{/other_user}","gists_url":"https://api.github.com/users/vinokurig/gists{/gist_id}","starred_url":"https://api.github.com/users/vinokurig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinokurig/subscriptions","organizations_url":"https://api.github.com/users/vinokurig/orgs","repos_url":"https://api.github.com/users/vinokurig/repos","events_url":"https://api.github.com/users/vinokurig/events{/privacy}","received_events_url":"https://api.github.com/users/vinokurig/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\n\r\n1. Сache svn credentials instead storing them in credentials provider\r\n2. Show dialog on remote svn operations that require authentication\r\n\r\n### What issues does this PR fix or reference?\r\nhttps://github.com/codenvy/codenvy/issues/687\r\n\r\n### PR type\r\n- [ ] Minor change = no change to existing features or docs\r\n- [x] Major change = changes existing features or docs\r\n\r\n### Major change checklist\r\n- [ ] New API required?\r\n- [ ] API updated\r\n- [ ] Documentation provided (include here or link to docs)\r\n- [ ] Tests provided / updated\r\n- [x] Tests passed\r\n\r\n\r\nPlease review [Che's Contributing Guide](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md) for best practices.\r\n\r\n@sleshchenko @vzhukovskii please review","created_at":"2016-09-30T19:12:55Z","updated_at":"2016-10-04T13:29:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee02e2dc0da8dbb5e7a0b52d0c0e34d85afb3232","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/che/pulls/2672/commits","review_comments_url":"https://api.github.com/repos/eclipse/che/pulls/2672/comments","review_comment_url":"https://api.github.com/repos/eclipse/che/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/che/issues/2672/comments","statuses_url":"https://api.github.com/repos/eclipse/che/statuses/b573fc5d1e474ac6602733be399ce0f4404cb283","head":{"label":"eclipse:CODENVY-687","ref":"CODENVY-687","sha":"b573fc5d1e474ac6602733be399ce0f4404cb283","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":32935745,"name":"che","full_name":"eclipse/che","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/che","description":"Eclipse Che: Next-generation Eclipse IDE.  Open source workspace server and cloud IDE.","fork":false,"url":"https://api.github.com/repos/eclipse/che","forks_url":"https://api.github.com/repos/eclipse/che/forks","keys_url":"https://api.github.com/repos/eclipse/che/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/che/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/che/teams","hooks_url":"https://api.github.com/repos/eclipse/che/hooks","issue_events_url":"https://api.github.com/repos/eclipse/che/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/che/events","assignees_url":"https://api.github.com/repos/eclipse/che/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/che/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/che/tags","blobs_url":"https://api.github.com/repos/eclipse/che/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/che/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/che/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/che/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/che/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/che/languages","stargazers_url":"https://api.github.com/repos/eclipse/che/stargazers","contributors_url":"https://api.github.com/repos/eclipse/che/contributors","subscribers_url":"https://api.github.com/repos/eclipse/che/subscribers","subscription_url":"https://api.github.com/repos/eclipse/che/subscription","commits_url":"https://api.github.com/repos/eclipse/che/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/che/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/che/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/che/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/che/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/che/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/che/merges","archive_url":"https://api.github.com/repos/eclipse/che/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/che/downloads","issues_url":"https://api.github.com/repos/eclipse/che/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/che/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/che/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/che/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/che/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/che/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/che/deployments","created_at":"2015-03-26T15:31:01Z","updated_at":"2016-10-03T23:03:44Z","pushed_at":"2016-10-04T13:28:13Z","git_url":"git://github.com/eclipse/che.git","ssh_url":"git@github.com:eclipse/che.git","clone_url":"https://github.com/eclipse/che.git","svn_url":"https://github.com/eclipse/che","homepage":"http://eclipse.org/che","size":53158,"stargazers_count":3226,"watchers_count":3226,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":526,"mirror_url":null,"open_issues_count":315,"forks":526,"open_issues":315,"watchers":3226,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"e079338a11905dbe2a73bc7b5b034d40e02b72d1","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":32935745,"name":"che","full_name":"eclipse/che","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/che","description":"Eclipse Che: Next-generation Eclipse IDE.  Open source workspace server and cloud IDE.","fork":false,"url":"https://api.github.com/repos/eclipse/che","forks_url":"https://api.github.com/repos/eclipse/che/forks","keys_url":"https://api.github.com/repos/eclipse/che/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/che/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/che/teams","hooks_url":"https://api.github.com/repos/eclipse/che/hooks","issue_events_url":"https://api.github.com/repos/eclipse/che/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/che/events","assignees_url":"https://api.github.com/repos/eclipse/che/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/che/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/che/tags","blobs_url":"https://api.github.com/repos/eclipse/che/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/che/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/che/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/che/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/che/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/che/languages","stargazers_url":"https://api.github.com/repos/eclipse/che/stargazers","contributors_url":"https://api.github.com/repos/eclipse/che/contributors","subscribers_url":"https://api.github.com/repos/eclipse/che/subscribers","subscription_url":"https://api.github.com/repos/eclipse/che/subscription","commits_url":"https://api.github.com/repos/eclipse/che/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/che/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/che/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/che/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/che/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/che/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/che/merges","archive_url":"https://api.github.com/repos/eclipse/che/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/che/downloads","issues_url":"https://api.github.com/repos/eclipse/che/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/che/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/che/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/che/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/che/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/che/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/che/deployments","created_at":"2015-03-26T15:31:01Z","updated_at":"2016-10-03T23:03:44Z","pushed_at":"2016-10-04T13:28:13Z","git_url":"git://github.com/eclipse/che.git","ssh_url":"git@github.com:eclipse/che.git","clone_url":"https://github.com/eclipse/che.git","svn_url":"https://github.com/eclipse/che","homepage":"http://eclipse.org/che","size":53158,"stargazers_count":3226,"watchers_count":3226,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":526,"mirror_url":null,"open_issues_count":315,"forks":526,"open_issues":315,"watchers":3226,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/che/pulls/2672"},"html":{"href":"https://github.com/eclipse/che/pull/2672"},"issue":{"href":"https://api.github.com/repos/eclipse/che/issues/2672"},"comments":{"href":"https://api.github.com/repos/eclipse/che/issues/2672/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/che/pulls/2672/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/che/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/che/pulls/2672/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/che/statuses/b573fc5d1e474ac6602733be399ce0f4404cb283"}}}}
{"actor":{"display_login":"vinokurig"}}