Page MenuHomePhabricator

D19701.id47073.diff
No OneTemporary

D19701.id47073.diff

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

Mime Type
text/plain
Expires
Fri, Mar 14, 2:58 PM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7660008
Default Alt Text
D19701.id47073.diff (1 KB)

Event Timeline