{"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":3,"created_at":"2016-11-22T16:28:31Z","updated_at":"2016-11-23T15:14:43Z","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/262541835","html_url":"https://github.com/subclipse/subclipse/pull/14#issuecomment-262541835","issue_url":"https://api.github.com/repos/subclipse/subclipse/issues/14","id":262541835,"user":{"login":"markphip","id":933108,"avatar_url":"https://avatars.githubusercontent.com/u/933108?v=3","gravatar_id":"","url":"https://api.github.com/users/markphip","html_url":"https://github.com/markphip","followers_url":"https://api.github.com/users/markphip/followers","following_url":"https://api.github.com/users/markphip/following{/other_user}","gists_url":"https://api.github.com/users/markphip/gists{/gist_id}","starred_url":"https://api.github.com/users/markphip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markphip/subscriptions","organizations_url":"https://api.github.com/users/markphip/orgs","repos_url":"https://api.github.com/users/markphip/repos","events_url":"https://api.github.com/users/markphip/events{/privacy}","received_events_url":"https://api.github.com/users/markphip/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T15:14:43Z","updated_at":"2016-11-23T15:14:43Z","body":"Getting the client from the Repository is just legacy code that pre-dates the 1.0 release.  That code should probably be removed and callers updated to use SVNClientManager directly.  There is nothing special about ISVNClient that makes it specific to any repository.  So yes it is safe to use it for multiple projects.\r\n\r\nI think that pre-1.0 the Repository contained the credentials, but we stopped supporting this a long, long time ago and rely on SVN's credential storage exclusively.  Anyway, this is probably why the early design had this method to get a client."}}
{"actor":{"display_login":"markphip"}}