Differential D9382 Diff 22373 src/applications/differential/editor/DifferentialTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/editor/DifferentialTransactionEditor.php
Show First 20 Lines • Show All 1,525 Lines • ▼ Show 20 Lines | private function updateAffectedPathTable( | ||||
if (!$repository) { | if (!$repository) { | ||||
// The repository where the code lives is untracked. | // The repository where the code lives is untracked. | ||||
return; | return; | ||||
} | } | ||||
$path_prefix = null; | $path_prefix = null; | ||||
$local_root = $diff->getSourceControlPath(); | $local_root = $diff->getSourceControlPath(); | ||||
if ($local_root) { | $is_svn = $repository->getVersionControlSystem() == | ||||
PhabricatorRepositoryType::REPOSITORY_TYPE_SVN; | |||||
if ($local_root && $is_svn) { | |||||
// We're in a working copy which supports subdirectory checkouts (e.g., | // We're in a working copy which supports subdirectory checkouts (e.g., | ||||
// SVN) so we need to figure out what prefix we should add to each path | // SVN) so we need to figure out what prefix we should add to each path | ||||
// (e.g., trunk/projects/example/) to get the absolute path from the | // (e.g., trunk/projects/example/) to get the absolute path from the | ||||
// root of the repository. DVCS systems like Git and Mercurial are not | // root of the repository. DVCS systems like Git and Mercurial are not | ||||
// affected. | // affected. | ||||
// Normalize both paths and check if the repository root is a prefix of | // Normalize both paths and check if the repository root is a prefix of | ||||
// the local root. If so, throw it away. Note that this correctly handles | // the local root. If so, throw it away. Note that this correctly handles | ||||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |