From: root Date: Sat, 5 Oct 2013 00:31:18 +0000 (-0700) Subject: Keep Arcanist from mistaking paths that look like svn:externals as svn:externals X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=10a9bb1e9941053f43c6d3ea4424456a0a17a92e;p=arcanist.git Keep Arcanist from mistaking paths that look like svn:externals as svn:externals Summary: Fixes T3920. Added a slash to the path and external name so that "public" and "publicnotexternal" won't appear to be the same root. Test Plan: We've had this issue in one of our projects for some time, just ran into it again today. Ran the patched arc against the same directory structure and the troublesome file was added to the diff. Confirmed that files modified in the "public" (svn external) folder are still caught as external modifications. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T3920 Differential Revision: https://secure.phabricator.com/D7226 --- diff --git a/src/repository/api/ArcanistSubversionAPI.php b/src/repository/api/ArcanistSubversionAPI.php index ce9767ed..6dd59362 100644 --- a/src/repository/api/ArcanistSubversionAPI.php +++ b/src/repository/api/ArcanistSubversionAPI.php @@ -128,7 +128,7 @@ final class ArcanistSubversionAPI extends ArcanistRepositoryAPI { foreach ($files as $path => $mask) { foreach ($externals as $external) { - if (!strncmp($path, $external, strlen($external))) { + if (!strncmp($path . '/', $external . '/', strlen($external) + 1)) { $files[$path] |= self::FLAG_EXTERNALS; } }