@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix bugs when saving package changes due to commit changes

Summary:
Because of the way PhabricatorOwnersPackage works, the code to save package
changes when parsing commit changes was raising a few undefined index errors,
and was throwing an exception trying to call a method on null (because not
all of the phids related to the package had their handles loaded). This fix
doesn't load the missing handles, it just avoids trying to use them.

Test Plan:
./scripts/repository/reparse.php on a commit with path changes that triggered
a package change

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4236

+2 -1
+1 -1
src/applications/owners/storage/PhabricatorOwnersPackage.php
··· 268 268 $path->getPath(), 269 269 array())); 270 270 $excluded = $path->getExcluded(); 271 - if (!$new_path || $new_path['excluded'] != $excluded) { 271 + if (!$new_path || idx($new_path, 'excluded') != $excluded) { 272 272 $touched_repos[$repository_phid] = true; 273 273 $remove_paths[$repository_phid][$path->getPath()] = $excluded; 274 274 $path->delete();
+1
src/applications/repository/worker/commitchangeparser/PhabricatorOwnersPackagePathValidator.php
··· 91 91 } 92 92 93 93 if ($new_paths) { 94 + $package->attachOldPrimaryOwnerPHID($package->getPrimaryOwnerPHID()); 94 95 $package->attachUnsavedPaths($new_paths); 95 96 $package->save(); // save the changes and notify the owners. 96 97 }