{"action":"created","issue":{"url":"https://api.github.com/repos/subclipse/subclipse/issues/14","repository_url":"https://api.github.com/repos/subclipse/subclipse","labels_url":"https://api.github.com/repos/subclipse/subclipse/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/subclipse/subclipse/issues/14/comments","events_url":"https://api.github.com/repos/subclipse/subclipse/issues/14/events","html_url":"https://github.com/subclipse/subclipse/pull/14","id":191055046,"number":14,"title":"CommitOperation: reset SVN client after dispose","user":{"login":"pks-t","id":4056630,"avatar_url":"https://avatars.githubusercontent.com/u/4056630?v=3","gravatar_id":"","url":"https://api.github.com/users/pks-t","html_url":"https://github.com/pks-t","followers_url":"https://api.github.com/users/pks-t/followers","following_url":"https://api.github.com/users/pks-t/following{/other_user}","gists_url":"https://api.github.com/users/pks-t/gists{/gist_id}","starred_url":"https://api.github.com/users/pks-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pks-t/subscriptions","organizations_url":"https://api.github.com/users/pks-t/orgs","repos_url":"https://api.github.com/users/pks-t/repos","events_url":"https://api.github.com/users/pks-t/events{/privacy}","received_events_url":"https://api.github.com/users/pks-t/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-11-22T16:28:31Z","updated_at":"2016-11-30T09:16:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/subclipse/subclipse/pulls/14","html_url":"https://github.com/subclipse/subclipse/pull/14","diff_url":"https://github.com/subclipse/subclipse/pull/14.diff","patch_url":"https://github.com/subclipse/subclipse/pull/14.patch"},"body":"CommitOperations allow for committing files from several\r\ndifferent SVN Team providers at the same time. This is for\r\nexample useful to commit from multiple working copies at the same\r\ntime. When doing this, we have to determine for each resource to\r\nbe committed, to which SVN Team provider it belongs and add it to\r\nthis provider's transaction. For each of these providers, we also\r\nhave to get a different SVN client, as one client cannot handle\r\nmultiple repositories.\r\n\r\nWhen we try to delete files from different providers, we get the\r\nset of providers for the files to be committed. Afterwards, we\r\niterate through each provider, get an SVN client and then commit\r\nthe files that belong to this specific provider. After each\r\niteration, we dispose the SVN client again.\r\n\r\nBut in fact, we do not reset the SVN client to `null`, so we will\r\nnever retrieve the client for following providers. As we call\r\n`dispose` after each iteration, this will lead to a double free\r\nerror in C++ code. The issue can be reproduced by commiting two\r\n_missing_ (not deleted) files from two different repositories at\r\nonce.\r\n\r\nFix the issue by resetting the SVN client to `null` after each\r\niteration."},"comment":{"url":"https://api.github.com/repos/subclipse/subclipse/issues/comments/263822380","html_url":"https://github.com/subclipse/subclipse/pull/14#issuecomment-263822380","issue_url":"https://api.github.com/repos/subclipse/subclipse/issues/14","id":263822380,"user":{"login":"pks-t","id":4056630,"avatar_url":"https://avatars.githubusercontent.com/u/4056630?v=3","gravatar_id":"","url":"https://api.github.com/users/pks-t","html_url":"https://github.com/pks-t","followers_url":"https://api.github.com/users/pks-t/followers","following_url":"https://api.github.com/users/pks-t/following{/other_user}","gists_url":"https://api.github.com/users/pks-t/gists{/gist_id}","starred_url":"https://api.github.com/users/pks-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pks-t/subscriptions","organizations_url":"https://api.github.com/users/pks-t/orgs","repos_url":"https://api.github.com/users/pks-t/repos","events_url":"https://api.github.com/users/pks-t/events{/privacy}","received_events_url":"https://api.github.com/users/pks-t/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T09:16:54Z","updated_at":"2016-11-30T09:16:54Z","body":"We can also have the best of both worlds: lazily initialize the client as before but then only dispose it after the last iteration. So simply move the try-catch-finally up one level so that it contains the loop instead of the other way round. The diff looks somewhat intriguing, but it's really mostly whitespace changes."}}
{"actor":{"display_login":"pks-t"}}