Differential D10585 Diff 25583 src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | protected function getSVNResult(ConduitAPIRequest $request) { | ||||
$change_type = $path->getChangeType(); | $change_type = $path->getChangeType(); | ||||
switch ($change_type) { | switch ($change_type) { | ||||
case DifferentialChangeType::TYPE_MULTICOPY: | case DifferentialChangeType::TYPE_MULTICOPY: | ||||
case DifferentialChangeType::TYPE_DELETE: | case DifferentialChangeType::TYPE_DELETE: | ||||
if ($path->getTargetPath()) { | if ($path->getTargetPath()) { | ||||
$old = array( | $old = array( | ||||
$path->getTargetPath(), | $path->getTargetPath(), | ||||
$path->getTargetCommitIdentifier()); | $path->getTargetCommitIdentifier(), | ||||
); | |||||
} else { | } else { | ||||
$old = array($path->getPath(), $path->getCommitIdentifier() - 1); | $old = array($path->getPath(), $path->getCommitIdentifier() - 1); | ||||
} | } | ||||
$old_name = $path->getPath(); | $old_name = $path->getPath(); | ||||
$new_name = ''; | $new_name = ''; | ||||
$new = null; | $new = null; | ||||
break; | break; | ||||
case DifferentialChangeType::TYPE_ADD: | case DifferentialChangeType::TYPE_ADD: | ||||
$old = null; | $old = null; | ||||
$new = array($path->getPath(), $path->getCommitIdentifier()); | $new = array($path->getPath(), $path->getCommitIdentifier()); | ||||
$old_name = ''; | $old_name = ''; | ||||
$new_name = $path->getPath(); | $new_name = $path->getPath(); | ||||
break; | break; | ||||
case DifferentialChangeType::TYPE_MOVE_HERE: | case DifferentialChangeType::TYPE_MOVE_HERE: | ||||
case DifferentialChangeType::TYPE_COPY_HERE: | case DifferentialChangeType::TYPE_COPY_HERE: | ||||
$old = array( | $old = array( | ||||
$path->getTargetPath(), | $path->getTargetPath(), | ||||
$path->getTargetCommitIdentifier()); | $path->getTargetCommitIdentifier(), | ||||
); | |||||
$new = array($path->getPath(), $path->getCommitIdentifier()); | $new = array($path->getPath(), $path->getCommitIdentifier()); | ||||
$old_name = $path->getTargetPath(); | $old_name = $path->getTargetPath(); | ||||
$new_name = $path->getPath(); | $new_name = $path->getPath(); | ||||
break; | break; | ||||
case DifferentialChangeType::TYPE_MOVE_AWAY: | case DifferentialChangeType::TYPE_MOVE_AWAY: | ||||
$old = array( | $old = array( | ||||
$path->getPath(), | $path->getPath(), | ||||
$path->getCommitIdentifier() - 1); | $path->getCommitIdentifier() - 1, | ||||
); | |||||
$old_name = $path->getPath(); | $old_name = $path->getPath(); | ||||
$new_name = null; | $new_name = null; | ||||
$new = null; | $new = null; | ||||
break; | break; | ||||
default: | default: | ||||
$old = array($path->getPath(), $path->getCommitIdentifier() - 1); | $old = array($path->getPath(), $path->getCommitIdentifier() - 1); | ||||
$new = array($path->getPath(), $path->getCommitIdentifier()); | $new = array($path->getPath(), $path->getCommitIdentifier()); | ||||
$old_name = $path->getPath(); | $old_name = $path->getPath(); | ||||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |