Page MenuHomePhabricator

D19420.diff
No OneTemporary

D19420.diff

diff --git a/src/applications/owners/xaction/PhabricatorOwnersPackagePathsTransaction.php b/src/applications/owners/xaction/PhabricatorOwnersPackagePathsTransaction.php
--- a/src/applications/owners/xaction/PhabricatorOwnersPackagePathsTransaction.php
+++ b/src/applications/owners/xaction/PhabricatorOwnersPackagePathsTransaction.php
@@ -108,19 +108,23 @@
// paths now.
$display_map = array();
+ $seen_map = array();
foreach ($new as $key => $spec) {
$display_path = $spec['path'];
$raw_path = rtrim($display_path, '/').'/';
- // If the user entered two paths which normalize to the same value
- // (like "src/main.c" and "src/main.c/"), discard the duplicates.
- if (isset($display_map[$raw_path])) {
+ // If the user entered two paths in the same repository which normalize
+ // to the same value (like "src/main.c" and "src/main.c/"), discard the
+ // duplicates.
+ $repository_phid = $spec['repositoryPHID'];
+ if (isset($seen_map[$repository_phid][$raw_path])) {
unset($new[$key]);
continue;
}
$new[$key]['path'] = $raw_path;
$display_map[$raw_path] = $display_path;
+ $seen_map[$repository_phid][$raw_path] = true;
}
$diffs = PhabricatorOwnersPath::getTransactionValueChanges($old, $new);

File Metadata

Mime Type
text/plain
Expires
Mar 15 2025, 12:31 PM (5 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7681034
Default Alt Text
D19420.diff (1 KB)

Event Timeline