From: Bob Trahan Date: Wed, 31 Oct 2012 01:26:58 +0000 (-0700) Subject: escape files properly in arc commit X-Git-Tag: conduit-6~50 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=522c35c1ed96b5f0d1f091f018ecd64220bd367f;p=arcanist.git escape files properly in arc commit Summary: turns out retina has files like image.png and image@2x.png. The latter breaks since '@' is a special command telling svn to "look for image at revision 2x.png" -- nonsensical garbage. If we add it to the end every time this error goes way. Test Plan: touch 2@2.png; svn add '2@2@'; arc diff; ; arc commit -- observe commit working Reviewers: epriestley Reviewed By: epriestley CC: mbishopim3, aran, Korvin Maniphest Tasks: T1999 Differential Revision: https://secure.phabricator.com/D3845 --- diff --git a/src/workflow/ArcanistCommitWorkflow.php b/src/workflow/ArcanistCommitWorkflow.php index 8551b0d0..aaceec5c 100644 --- a/src/workflow/ArcanistCommitWorkflow.php +++ b/src/workflow/ArcanistCommitWorkflow.php @@ -261,7 +261,10 @@ EOTEXT $this->promptFileWarning($prefix, $prompt, $do_not_exist); } - $files = array_keys($commit_paths); + $files = array(); + foreach ($commit_paths as $file => $ignored) { + $files[] = $file.'@'; // make SVN accept commits like foo@2x.png + } if (empty($files)) { throw new ArcanistUsageException(