Differential D7653 Diff 17289 src/applications/differential/conduit/ConduitAPI_differential_creatediff_Method.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/conduit/ConduitAPI_differential_creatediff_Method.php
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | if ($parent_id) { | ||||
// a parent revision ID. This isn't used for anything meaningful. | // a parent revision ID. This isn't used for anything meaningful. | ||||
// TODO: Can we delete this entirely? | // TODO: Can we delete this entirely? | ||||
$parent_rev = id(new DifferentialRevisionQuery()) | $parent_rev = id(new DifferentialRevisionQuery()) | ||||
->setViewer($request->getUser()) | ->setViewer($request->getUser()) | ||||
->withIDs(array($parent_id)) | ->withIDs(array($parent_id)) | ||||
->execute(); | ->execute(); | ||||
if ($parent_rev) { | if ($parent_rev) { | ||||
$parent_rev = head($parent_rev); | $parent_rev = head($parent_rev); | ||||
if ($parent_rev->getStatus() != | if (!$parent_rev->isClosed()) { | ||||
ArcanistDifferentialRevisionStatus::CLOSED) { | |||||
$diff->setParentRevisionID($parent_id); | $diff->setParentRevisionID($parent_id); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
$system = $request->getValue('sourceControlSystem'); | $system = $request->getValue('sourceControlSystem'); | ||||
$diff->setSourceControlSystem($system); | $diff->setSourceControlSystem($system); | ||||
$diff->setSourceControlPath($request->getValue('sourceControlPath')); | $diff->setSourceControlPath($request->getValue('sourceControlPath')); | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |