Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15382467
D19420.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19420.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D19420: Fix an issue where entering the same Owners path for two repositories would incorrectly de-dupe the path
Attached
Detach File
Event Timeline
Log In to Comment