diff --git a/src/parser/diff/ArcanistDiffParser.php b/src/parser/diff/ArcanistDiffParser.php index 716139a9..f8405bd2 100644 --- a/src/parser/diff/ArcanistDiffParser.php +++ b/src/parser/diff/ArcanistDiffParser.php @@ -132,6 +132,12 @@ final class ArcanistDiffParser { $from[$path] = $cpath; } + $type = $change->getType(); + if (($type === ArcanistDiffChangeType::TYPE_MOVE_AWAY || + $type === ArcanistDiffChangeType::TYPE_DELETE) && + idx($info, 'Node Kind') === 'directory') { + $change->setFileType(ArcanistDiffChangeType::FILE_DIRECTORY); + } } foreach ($paths as $path => $status) { diff --git a/src/repository/api/subversion/ArcanistSubversionAPI.php b/src/repository/api/subversion/ArcanistSubversionAPI.php index b84cf44a..4498b60a 100644 --- a/src/repository/api/subversion/ArcanistSubversionAPI.php +++ b/src/repository/api/subversion/ArcanistSubversionAPI.php @@ -291,6 +291,7 @@ final class ArcanistSubversionAPI extends ArcanistRepositoryAPI { '/^(Copied From URL): (\S+)$/m', '/^(Copied From Rev): (\d+)$/m', '/^(Repository UUID): (\S+)$/m', + '/^(Node Kind): (\S+)$/m', ); $result = array(); @@ -426,6 +427,10 @@ EODIFF; return null; } + if (!file_exists($full_path)) { + return null; + } + $data = Filesystem::readFile($full_path); $lines = explode("\n", $data); $len = count($lines); diff --git a/src/workflow/base/ArcanistBaseWorkflow.php b/src/workflow/base/ArcanistBaseWorkflow.php index 9cc5a18f..90909f08 100644 --- a/src/workflow/base/ArcanistBaseWorkflow.php +++ b/src/workflow/base/ArcanistBaseWorkflow.php @@ -753,6 +753,10 @@ abstract class ArcanistBaseWorkflow { return null; } + if (!file_exists($full_path)) { + return null; + } + $change = $this->getChange($path); if ($change->getFileType() !== ArcanistDiffChangeType::FILE_TEXT) {