Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15392575
D19701.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
D19701.diff
View Options
diff --git a/src/applications/repository/storage/PhabricatorRepositoryWorkingCopyVersion.php b/src/applications/repository/storage/PhabricatorRepositoryWorkingCopyVersion.php
--- a/src/applications/repository/storage/PhabricatorRepositoryWorkingCopyVersion.php
+++ b/src/applications/repository/storage/PhabricatorRepositoryWorkingCopyVersion.php
@@ -76,18 +76,20 @@
public static function getReadLock($repository_phid, $device_phid) {
- $repository_hash = PhabricatorHash::digestForIndex($repository_phid);
- $device_hash = PhabricatorHash::digestForIndex($device_phid);
- $lock_key = "repo.read({$repository_hash}, {$device_hash})";
+ $parameters = array(
+ 'repositoryPHID' => $repository_phid,
+ 'devicePHID' => $device_phid,
+ );
- return PhabricatorGlobalLock::newLock($lock_key);
+ return PhabricatorGlobalLock::newLock('repo.read', $parameters);
}
public static function getWriteLock($repository_phid) {
- $repository_hash = PhabricatorHash::digestForIndex($repository_phid);
- $lock_key = "repo.write({$repository_hash})";
+ $parameters = array(
+ 'repositoryPHID' => $repository_phid,
+ );
- return PhabricatorGlobalLock::newLock($lock_key);
+ return PhabricatorGlobalLock::newLock('repo.write', $parameters);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 16, 4:04 PM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7660008
Default Alt Text
D19701.diff (1 KB)
Attached To
Mode
D19701: Parameterize the repository read and write locks
Attached
Detach File
Event Timeline
Log In to Comment