From: Nick Harper Date: Wed, 10 Apr 2013 22:22:58 +0000 (-0700) Subject: [svn] Fix removing a binary file without svn:mime-type set X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=b1fe436cfc23bb2fbea59bd5ea0098c1375c5353;p=arcanist.git [svn] Fix removing a binary file without svn:mime-type set Summary: If we're removing a binary file that didn't have svn:mime-type set properly, we can't propset it (because the file doesn't exist locally). Instead, just return a synthetic diff for the removed file. Test Plan: run arc diff in an svn working copy where I ran svn rm on a binary file that doesn't have svn:mime-type set, and the diff correctly gets uploaded to phabricator instead of erroring when trying to set properties. Reviewers: epriestley, wez Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5655 --- diff --git a/src/repository/api/ArcanistSubversionAPI.php b/src/repository/api/ArcanistSubversionAPI.php index 3f270498..7206e311 100644 --- a/src/repository/api/ArcanistSubversionAPI.php +++ b/src/repository/api/ArcanistSubversionAPI.php @@ -383,6 +383,15 @@ final class ArcanistSubversionAPI extends ArcanistRepositoryAPI { $matches = null; if (preg_match('/\.(gif|png|jpe?g|swf|pdf|ico)$/i', $path, $matches)) { $mime = $this->getSVNProperty($path, 'svn:mime-type'); + if ($status & ArcanistRepositoryAPI::FLAG_DELETED) { + return <<