mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Create new paths in Differential
Summary: It is used by 'Pending Differential Revisions'. Test Plan: Created a new file, `arc diff`, looked at this path in Diffusion, saw Pending Differential Revisions. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3991
This commit is contained in:
parent
3732f14740
commit
03aca35cce
1 changed files with 4 additions and 10 deletions
|
@ -807,21 +807,15 @@ final class DifferentialRevisionEditor extends PhabricatorEditor {
|
|||
}
|
||||
$all_paths = array_keys($all_paths);
|
||||
|
||||
$path_map = id(new DiffusionPathIDQuery($all_paths))->loadPathIDs();
|
||||
$path_ids =
|
||||
PhabricatorRepositoryCommitChangeParserWorker::lookupOrCreatePaths(
|
||||
$all_paths);
|
||||
|
||||
$table = new DifferentialAffectedPath();
|
||||
$conn_w = $table->establishConnection('w');
|
||||
|
||||
$sql = array();
|
||||
foreach ($all_paths as $path) {
|
||||
$path_id = idx($path_map, $path);
|
||||
if (!$path_id) {
|
||||
// Don't bother creating these, it probably means we're either adding
|
||||
// a file (in which case having this row is irrelevant since Diffusion
|
||||
// won't be querying for it) or something is misconfigured (in which
|
||||
// case we'd just be writing garbage).
|
||||
continue;
|
||||
}
|
||||
foreach ($path_ids as $path_id) {
|
||||
$sql[] = qsprintf(
|
||||
$conn_w,
|
||||
'(%d, %d, %d, %d)',
|
||||
|
|
Loading…
Reference in a new issue