1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-01 01:18:22 +01:00

Handle SVN root changes correctly

Summary: If there is a change in SVN root (perhaps properties change) then we try to list its parent (which doesn't exist) and mark the root itself as deleted.

Test Plan: Parsed SVN commit with property change of root.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5709
This commit is contained in:
Jakub Vrana 2013-04-16 08:28:38 -07:00
parent de9b00b8be
commit a9099912bb

View file

@ -570,8 +570,14 @@ final class PhabricatorRepositorySvnCommitChangeParserWorker
PhabricatorRepository $repository, PhabricatorRepository $repository,
array $paths) { array $paths) {
$result_map = array();
$repository_uri = $repository->getDetail('remote-uri'); $repository_uri = $repository->getDetail('remote-uri');
if (isset($paths['/'])) {
$result_map['/'] = DifferentialChangeType::FILE_DIRECTORY;
unset($paths['/']);
}
$parents = array(); $parents = array();
$path_mapping = array(); $path_mapping = array();
foreach ($paths as $path => $lookup) { foreach ($paths as $path => $lookup) {
@ -584,8 +590,6 @@ final class PhabricatorRepositorySvnCommitChangeParserWorker
$path_mapping[$parent][] = dirname($path); $path_mapping[$parent][] = dirname($path);
} }
$result_map = array();
// Reverse this list so we can pop $path_mapping, as that's more efficient // Reverse this list so we can pop $path_mapping, as that's more efficient
// than shifting it. We need to associate these maps positionally because // than shifting it. We need to associate these maps positionally because
// a change can copy the same source path from multiple revisions via // a change can copy the same source path from multiple revisions via