From 10a9bb1e9941053f43c6d3ea4424456a0a17a92e Mon Sep 17 00:00:00 2001 From: root Date: Fri, 4 Oct 2013 17:31:18 -0700 Subject: [PATCH] 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 --- src/repository/api/ArcanistSubversionAPI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } }