]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Keep Arcanist from mistaking paths that look like svn:externals as svn:externals
authorroot <root@diablomedia.com>
Sat, 5 Oct 2013 00:31:18 +0000 (17:31 -0700)
committerepriestley <git@epriestley.com>
Sat, 5 Oct 2013 00:31:18 +0000 (17:31 -0700)
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

index ce9767ed2603d95b1e6a3bd9025d326f3621ce89..6dd593629296391d8037a6ab8902eb6876728ba6 100644 (file)
@@ -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;
           }
         }