{"action":"closed","number":193,"pull_request":{"url":"https://api.github.com/repos/lookfirst/sardine/pulls/193","id":28441145,"html_url":"https://github.com/lookfirst/sardine/pull/193","diff_url":"https://github.com/lookfirst/sardine/pull/193.diff","patch_url":"https://github.com/lookfirst/sardine/pull/193.patch","issue_url":"https://api.github.com/repos/lookfirst/sardine/issues/193","number":193,"state":"closed","locked":false,"title":"Making overwrite optional for move() and copy()","user":{"login":"trejkaz","id":43236,"avatar_url":"https://avatars.githubusercontent.com/u/43236?v=3","gravatar_id":"","url":"https://api.github.com/users/trejkaz","html_url":"https://github.com/trejkaz","followers_url":"https://api.github.com/users/trejkaz/followers","following_url":"https://api.github.com/users/trejkaz/following{/other_user}","gists_url":"https://api.github.com/users/trejkaz/gists{/gist_id}","starred_url":"https://api.github.com/users/trejkaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trejkaz/subscriptions","organizations_url":"https://api.github.com/users/trejkaz/orgs","repos_url":"https://api.github.com/users/trejkaz/repos","events_url":"https://api.github.com/users/trejkaz/events{/privacy}","received_events_url":"https://api.github.com/users/trejkaz/received_events","type":"User","site_admin":false},"body":"Our own filesystem abstraction only has rename(String,String), but took the safe route of defaulting to failing if the destination file exists. At the moment, Sardine has move(String,String) but it defaults to overwrite.\r\n\r\nThis patch adds an overload with an additional boolean flag to specify whether to overwrite or not. It doesn't do a lot more than that - for instance, someone might prefer specific exceptions for these 412 errors, but it doesn't seem like we get a specific exception for 404 either, so at least it's consistent.\r\n\r\nI added the missing test cases for move but didn't see a test case for copy so left it alone. All the tests failed for me anyway... possibly because they appear to depend on a real server.\r\n","created_at":"2015-02-02T01:46:47Z","updated_at":"2015-02-03T20:35:04Z","closed_at":"2015-02-03T20:35:04Z","merged_at":"2015-02-03T20:35:04Z","merge_commit_sha":"fb5b6db613620d5cf2c9b0bad0389e0db64d2bb7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lookfirst/sardine/pulls/193/commits","review_comments_url":"https://api.github.com/repos/lookfirst/sardine/pulls/193/comments","review_comment_url":"https://api.github.com/repos/lookfirst/sardine/pulls/comments/{number}","comments_url":"https://api.github.com/repos/lookfirst/sardine/issues/193/comments","statuses_url":"https://api.github.com/repos/lookfirst/sardine/statuses/3a10dce50d0e390fca5bddc7177506a2405ddc48","head":{"label":"trejkaz:optional-overwrite","ref":"optional-overwrite","sha":"3a10dce50d0e390fca5bddc7177506a2405ddc48","user":{"login":"trejkaz","id":43236,"avatar_url":"https://avatars.githubusercontent.com/u/43236?v=3","gravatar_id":"","url":"https://api.github.com/users/trejkaz","html_url":"https://github.com/trejkaz","followers_url":"https://api.github.com/users/trejkaz/followers","following_url":"https://api.github.com/users/trejkaz/following{/other_user}","gists_url":"https://api.github.com/users/trejkaz/gists{/gist_id}","starred_url":"https://api.github.com/users/trejkaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trejkaz/subscriptions","organizations_url":"https://api.github.com/users/trejkaz/orgs","repos_url":"https://api.github.com/users/trejkaz/repos","events_url":"https://api.github.com/users/trejkaz/events{/privacy}","received_events_url":"https://api.github.com/users/trejkaz/received_events","type":"User","site_admin":false},"repo":{"id":30165438,"name":"sardine","full_name":"trejkaz/sardine","owner":{"login":"trejkaz","id":43236,"avatar_url":"https://avatars.githubusercontent.com/u/43236?v=3","gravatar_id":"","url":"https://api.github.com/users/trejkaz","html_url":"https://github.com/trejkaz","followers_url":"https://api.github.com/users/trejkaz/followers","following_url":"https://api.github.com/users/trejkaz/following{/other_user}","gists_url":"https://api.github.com/users/trejkaz/gists{/gist_id}","starred_url":"https://api.github.com/users/trejkaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trejkaz/subscriptions","organizations_url":"https://api.github.com/users/trejkaz/orgs","repos_url":"https://api.github.com/users/trejkaz/repos","events_url":"https://api.github.com/users/trejkaz/events{/privacy}","received_events_url":"https://api.github.com/users/trejkaz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/trejkaz/sardine","description":"an easy to use webdav client for java","fork":true,"url":"https://api.github.com/repos/trejkaz/sardine","forks_url":"https://api.github.com/repos/trejkaz/sardine/forks","keys_url":"https://api.github.com/repos/trejkaz/sardine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trejkaz/sardine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trejkaz/sardine/teams","hooks_url":"https://api.github.com/repos/trejkaz/sardine/hooks","issue_events_url":"https://api.github.com/repos/trejkaz/sardine/issues/events{/number}","events_url":"https://api.github.com/repos/trejkaz/sardine/events","assignees_url":"https://api.github.com/repos/trejkaz/sardine/assignees{/user}","branches_url":"https://api.github.com/repos/trejkaz/sardine/branches{/branch}","tags_url":"https://api.github.com/repos/trejkaz/sardine/tags","blobs_url":"https://api.github.com/repos/trejkaz/sardine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trejkaz/sardine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trejkaz/sardine/git/refs{/sha}","trees_url":"https://api.github.com/repos/trejkaz/sardine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trejkaz/sardine/statuses/{sha}","languages_url":"https://api.github.com/repos/trejkaz/sardine/languages","stargazers_url":"https://api.github.com/repos/trejkaz/sardine/stargazers","contributors_url":"https://api.github.com/repos/trejkaz/sardine/contributors","subscribers_url":"https://api.github.com/repos/trejkaz/sardine/subscribers","subscription_url":"https://api.github.com/repos/trejkaz/sardine/subscription","commits_url":"https://api.github.com/repos/trejkaz/sardine/commits{/sha}","git_commits_url":"https://api.github.com/repos/trejkaz/sardine/git/commits{/sha}","comments_url":"https://api.github.com/repos/trejkaz/sardine/comments{/number}","issue_comment_url":"https://api.github.com/repos/trejkaz/sardine/issues/comments/{number}","contents_url":"https://api.github.com/repos/trejkaz/sardine/contents/{+path}","compare_url":"https://api.github.com/repos/trejkaz/sardine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trejkaz/sardine/merges","archive_url":"https://api.github.com/repos/trejkaz/sardine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trejkaz/sardine/downloads","issues_url":"https://api.github.com/repos/trejkaz/sardine/issues{/number}","pulls_url":"https://api.github.com/repos/trejkaz/sardine/pulls{/number}","milestones_url":"https://api.github.com/repos/trejkaz/sardine/milestones{/number}","notifications_url":"https://api.github.com/repos/trejkaz/sardine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trejkaz/sardine/labels{/name}","releases_url":"https://api.github.com/repos/trejkaz/sardine/releases{/id}","created_at":"2015-02-02T00:53:03Z","updated_at":"2015-02-02T00:53:04Z","pushed_at":"2015-02-02T05:08:02Z","git_url":"git://github.com/trejkaz/sardine.git","ssh_url":"git@github.com:trejkaz/sardine.git","clone_url":"https://github.com/trejkaz/sardine.git","svn_url":"https://github.com/trejkaz/sardine","homepage":null,"size":10726,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"lookfirst:master","ref":"master","sha":"b679833a947b27955d7155f62353c7aad886877c","user":{"login":"lookfirst","id":85355,"avatar_url":"https://avatars.githubusercontent.com/u/85355?v=3","gravatar_id":"","url":"https://api.github.com/users/lookfirst","html_url":"https://github.com/lookfirst","followers_url":"https://api.github.com/users/lookfirst/followers","following_url":"https://api.github.com/users/lookfirst/following{/other_user}","gists_url":"https://api.github.com/users/lookfirst/gists{/gist_id}","starred_url":"https://api.github.com/users/lookfirst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lookfirst/subscriptions","organizations_url":"https://api.github.com/users/lookfirst/orgs","repos_url":"https://api.github.com/users/lookfirst/repos","events_url":"https://api.github.com/users/lookfirst/events{/privacy}","received_events_url":"https://api.github.com/users/lookfirst/received_events","type":"User","site_admin":false},"repo":{"id":9529503,"name":"sardine","full_name":"lookfirst/sardine","owner":{"login":"lookfirst","id":85355,"avatar_url":"https://avatars.githubusercontent.com/u/85355?v=3","gravatar_id":"","url":"https://api.github.com/users/lookfirst","html_url":"https://github.com/lookfirst","followers_url":"https://api.github.com/users/lookfirst/followers","following_url":"https://api.github.com/users/lookfirst/following{/other_user}","gists_url":"https://api.github.com/users/lookfirst/gists{/gist_id}","starred_url":"https://api.github.com/users/lookfirst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lookfirst/subscriptions","organizations_url":"https://api.github.com/users/lookfirst/orgs","repos_url":"https://api.github.com/users/lookfirst/repos","events_url":"https://api.github.com/users/lookfirst/events{/privacy}","received_events_url":"https://api.github.com/users/lookfirst/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lookfirst/sardine","description":"an easy to use webdav client for java","fork":false,"url":"https://api.github.com/repos/lookfirst/sardine","forks_url":"https://api.github.com/repos/lookfirst/sardine/forks","keys_url":"https://api.github.com/repos/lookfirst/sardine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lookfirst/sardine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lookfirst/sardine/teams","hooks_url":"https://api.github.com/repos/lookfirst/sardine/hooks","issue_events_url":"https://api.github.com/repos/lookfirst/sardine/issues/events{/number}","events_url":"https://api.github.com/repos/lookfirst/sardine/events","assignees_url":"https://api.github.com/repos/lookfirst/sardine/assignees{/user}","branches_url":"https://api.github.com/repos/lookfirst/sardine/branches{/branch}","tags_url":"https://api.github.com/repos/lookfirst/sardine/tags","blobs_url":"https://api.github.com/repos/lookfirst/sardine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lookfirst/sardine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lookfirst/sardine/git/refs{/sha}","trees_url":"https://api.github.com/repos/lookfirst/sardine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lookfirst/sardine/statuses/{sha}","languages_url":"https://api.github.com/repos/lookfirst/sardine/languages","stargazers_url":"https://api.github.com/repos/lookfirst/sardine/stargazers","contributors_url":"https://api.github.com/repos/lookfirst/sardine/contributors","subscribers_url":"https://api.github.com/repos/lookfirst/sardine/subscribers","subscription_url":"https://api.github.com/repos/lookfirst/sardine/subscription","commits_url":"https://api.github.com/repos/lookfirst/sardine/commits{/sha}","git_commits_url":"https://api.github.com/repos/lookfirst/sardine/git/commits{/sha}","comments_url":"https://api.github.com/repos/lookfirst/sardine/comments{/number}","issue_comment_url":"https://api.github.com/repos/lookfirst/sardine/issues/comments/{number}","contents_url":"https://api.github.com/repos/lookfirst/sardine/contents/{+path}","compare_url":"https://api.github.com/repos/lookfirst/sardine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lookfirst/sardine/merges","archive_url":"https://api.github.com/repos/lookfirst/sardine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lookfirst/sardine/downloads","issues_url":"https://api.github.com/repos/lookfirst/sardine/issues{/number}","pulls_url":"https://api.github.com/repos/lookfirst/sardine/pulls{/number}","milestones_url":"https://api.github.com/repos/lookfirst/sardine/milestones{/number}","notifications_url":"https://api.github.com/repos/lookfirst/sardine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lookfirst/sardine/labels{/name}","releases_url":"https://api.github.com/repos/lookfirst/sardine/releases{/id}","created_at":"2013-04-18T19:01:30Z","updated_at":"2015-01-21T17:12:42Z","pushed_at":"2015-02-03T20:35:04Z","git_url":"git://github.com/lookfirst/sardine.git","ssh_url":"git@github.com:lookfirst/sardine.git","clone_url":"https://github.com/lookfirst/sardine.git","svn_url":"https://github.com/lookfirst/sardine","homepage":null,"size":11249,"stargazers_count":93,"watchers_count":93,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"open_issues_count":13,"forks":50,"open_issues":13,"watchers":93,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lookfirst/sardine/pulls/193"},"html":{"href":"https://github.com/lookfirst/sardine/pull/193"},"issue":{"href":"https://api.github.com/repos/lookfirst/sardine/issues/193"},"comments":{"href":"https://api.github.com/repos/lookfirst/sardine/issues/193/comments"},"review_comments":{"href":"https://api.github.com/repos/lookfirst/sardine/pulls/193/comments"},"review_comment":{"href":"https://api.github.com/repos/lookfirst/sardine/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/lookfirst/sardine/pulls/193/commits"},"statuses":{"href":"https://api.github.com/repos/lookfirst/sardine/statuses/3a10dce50d0e390fca5bddc7177506a2405ddc48"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"lookfirst","id":85355,"avatar_url":"https://avatars.githubusercontent.com/u/85355?v=3","gravatar_id":"","url":"https://api.github.com/users/lookfirst","html_url":"https://github.com/lookfirst","followers_url":"https://api.github.com/users/lookfirst/followers","following_url":"https://api.github.com/users/lookfirst/following{/other_user}","gists_url":"https://api.github.com/users/lookfirst/gists{/gist_id}","starred_url":"https://api.github.com/users/lookfirst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lookfirst/subscriptions","organizations_url":"https://api.github.com/users/lookfirst/orgs","repos_url":"https://api.github.com/users/lookfirst/repos","events_url":"https://api.github.com/users/lookfirst/events{/privacy}","received_events_url":"https://api.github.com/users/lookfirst/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":1,"additions":84,"deletions":11,"changed_files":5}}