@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 two issues with Differential updates and Owners

Summary:
Ref T13114.

- Followup fix for D19267, which didn't work correctly with //new// revision creation.
- Followup fix for changes in T11015. Some of the querying logic was still handling "/x.y" and "/x.y/" differently. Instead, normalize consistently to "/x.y/"

Test Plan:
- Created a new revision cleanly.
- Created a package owning only a `example.txt` file and saw Differential find it as an owning package in the table of contents.

Maniphest Tasks: T13114

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

+15 -10
+3 -1
src/applications/differential/xaction/DifferentialRevisionUpdateTransaction.php
··· 137 137 continue; 138 138 } 139 139 140 - $is_attached = ($diff->getRevisionID() == $object->getID()); 140 + $is_attached = 141 + ($diff->getRevisionID()) && 142 + ($diff->getRevisionID() == $object->getID()); 141 143 if ($is_attached) { 142 144 $is_active = ($diff_phid == $object->getActiveDiffPHID()); 143 145 } else {
+12 -9
src/applications/owners/storage/PhabricatorOwnersPackage.php
··· 393 393 } 394 394 395 395 public static function splitPath($path) { 396 - $trailing_slash = preg_match('@/$@', $path) ? '/' : ''; 397 - $path = trim($path, '/'); 396 + $result = array( 397 + '/', 398 + ); 399 + 398 400 $parts = explode('/', $path); 401 + $buffer = '/'; 402 + foreach ($parts as $part) { 403 + if (!strlen($part)) { 404 + continue; 405 + } 399 406 400 - $result = array(); 401 - while (count($parts)) { 402 - $result[] = '/'.implode('/', $parts).$trailing_slash; 403 - $trailing_slash = '/'; 404 - array_pop($parts); 407 + $buffer = $buffer.$part.'/'; 408 + $result[] = $buffer; 405 409 } 406 - $result[] = '/'; 407 410 408 - return array_reverse($result); 411 + return $result; 409 412 } 410 413 411 414 public function attachPaths(array $paths) {