Differential D20418 Diff 48760 src/applications/repository/management/PhabricatorRepositoryManagementUnpublishWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/management/PhabricatorRepositoryManagementUnpublishWorkflow.php
Show First 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | if ($type === DiffusionCommitHasRevisionEdgeType::EDGECONST) { | ||||
array( | array( | ||||
DifferentialRevisionCloseTransaction::TRANSACTIONTYPE, | DifferentialRevisionCloseTransaction::TRANSACTIONTYPE, | ||||
)) | )) | ||||
->execute(); | ->execute(); | ||||
if ($xactions) { | if ($xactions) { | ||||
foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
$metadata = $xaction->getMetadata(); | $metadata = $xaction->getMetadata(); | ||||
if (idx($metadata, 'isCommitClose')) { | |||||
if (idx($metadata, 'commitPHID') === $src->getPHID()) { | if (idx($metadata, 'commitPHID') === $src->getPHID()) { | ||||
echo tsprintf( | echo tsprintf( | ||||
"%s\n", | "%s\n", | ||||
pht( | pht( | ||||
'MANUAL Revision "%s" was likely closed improperly by "%s".', | 'MANUAL Revision "%s" was likely closed improperly by "%s".', | ||||
$dst->getMonogram(), | $dst->getMonogram(), | ||||
$src->getMonogram())); | $src->getMonogram())); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | |||||
if (!$is_dry_run) { | if (!$is_dry_run) { | ||||
id(new PhabricatorEdgeEditor()) | id(new PhabricatorEdgeEditor()) | ||||
->removeEdge($src->getPHID(), $type, $dst->getPHID()) | ->removeEdge($src->getPHID(), $type, $dst->getPHID()) | ||||
->save(); | ->save(); | ||||
echo tsprintf( | echo tsprintf( | ||||
"%s\n", | "%s\n", | ||||
pht( | pht( | ||||
Show All 9 Lines |