Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialRevision.php
Show First 20 Lines • Show All 436 Lines • ▼ Show 20 Lines | foreach ($authority_map as $path => $package_map) { | ||||
'strength' => $best_match, | 'strength' => $best_match, | ||||
'package' => $best_package, | 'package' => $best_package, | ||||
); | ); | ||||
} | } | ||||
} | } | ||||
// For each path which the viewer owns a package for, find other packages | // For each path which the viewer owns a package for, find other packages | ||||
// which that authority can be used to force-accept. Once we find a way to | // which that authority can be used to force-accept. Once we find a way to | ||||
// force-accept a package, we don't need to keep loooking. | // force-accept a package, we don't need to keep looking. | ||||
$has_control = array(); | $has_control = array(); | ||||
foreach ($force_map as $path => $spec) { | foreach ($force_map as $path => $spec) { | ||||
$path_fragments = PhabricatorOwnersPackage::splitPath($path); | $path_fragments = PhabricatorOwnersPackage::splitPath($path); | ||||
$fragment_count = count($path_fragments); | $fragment_count = count($path_fragments); | ||||
$authority_strength = $spec['strength']; | $authority_strength = $spec['strength']; | ||||
$control_packages = $control_map[$path]; | $control_packages = $control_map[$path]; | ||||
▲ Show 20 Lines • Show All 432 Lines • ▼ Show 20 Lines | $this->openTransaction(); | ||||
$conn_w = $this->establishConnection('w'); | $conn_w = $this->establishConnection('w'); | ||||
queryfx( | queryfx( | ||||
$conn_w, | $conn_w, | ||||
'DELETE FROM %T WHERE revisionID = %d', | 'DELETE FROM %T WHERE revisionID = %d', | ||||
self::TABLE_COMMIT, | self::TABLE_COMMIT, | ||||
$this->getID()); | $this->getID()); | ||||
// we have to do paths a little differentally as they do not have | // we have to do paths a little differently as they do not have | ||||
// an id or phid column for delete() to act on | // an id or phid column for delete() to act on | ||||
$dummy_path = new DifferentialAffectedPath(); | $dummy_path = new DifferentialAffectedPath(); | ||||
queryfx( | queryfx( | ||||
$conn_w, | $conn_w, | ||||
'DELETE FROM %T WHERE revisionID = %d', | 'DELETE FROM %T WHERE revisionID = %d', | ||||
$dummy_path->getTableName(), | $dummy_path->getTableName(), | ||||
$this->getID()); | $this->getID()); | ||||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |